Advertisement
Guest User

Untitled

a guest
May 21st, 2023
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.52 KB | None | 0 0
  1. /* Overwrite some colours */
  2. :root {
  3. --tab-separator: transparent;
  4. --tab-selected-line: transparent;
  5. --tablist-separator: #cccccc;
  6. --overflow-indicator-border: #333333;
  7. }
  8.  
  9. @media (prefers-color-scheme: dark) {
  10. :root {
  11. --background: #1c1b22;
  12. --icons: rgb(251,251,254);
  13. --tab-separator: transparent;
  14. --tab-active-background: rgb(66,65,77);
  15. --tab-active-text: rgb(251,251,254);
  16. --tab-text: #fbfbfe;
  17. --toolbar-background: rgb(43,42,51);
  18. --toolbar-text: rgb(251, 251, 254);
  19. --input-background: rgb(28,27,34);
  20. --input-border: transparent;
  21. --input-background-focus: rgb(66,65,77);
  22. --input-selected-text: rgb(251,251,254);
  23. --input-text: rgb(251,251,254);
  24. --input-text-focus: rgb(251,251,254);
  25. --identity-color-toolbar: rgb(251,251,254);
  26. --tablist-separator: #333333;
  27. --overflow-indicator-border: #cccccc;
  28. }
  29. }
  30.  
  31. /* fix autoscrolling bug when middle clicking */
  32. :root,
  33. body {
  34. overflow: hidden;
  35. }
  36.  
  37. /* Move topmenu to bottom */
  38. #topmenu {
  39. order: 2;
  40. background: transparent;
  41. border: none;
  42. }
  43.  
  44. #newtab {
  45. margin-left: 6px;
  46. }
  47.  
  48. #settings {
  49. margin-right: 2px;
  50. }
  51.  
  52. /* Hide filterbox & settings icon */
  53. #filterbox-icon,
  54. #filterbox-input,
  55. #settings {
  56. display: none;
  57. }
  58.  
  59. #tablist-wrapper {
  60. height: auto;
  61. margin-inline: 6px;
  62. /* adds margin above tabs to make the spacing even */
  63. margin-top: 5px;
  64. }
  65.  
  66. /* fix glitch with spacing in-between pinned tabs */
  67. #pinnedtablist:not(.compact) {
  68. display: flex;
  69. flex-direction: column;
  70. }
  71.  
  72. #tablist-wrapper::after {
  73. content: "";
  74. margin: 2px 0;
  75. border: 1px solid var(--tablist-separator);
  76. }
  77.  
  78. #newtab {
  79. flex-grow: 1;
  80. margin-right: 2px;
  81. margin-left: 2px;
  82. padding-left: 9px;
  83. min-width: 36px;
  84. width: 100%;
  85. }
  86.  
  87. .tab,
  88. .tab.active {
  89. border-radius: 4px;
  90. border-bottom: none !important;
  91. margin: 1px 0;
  92. }
  93.  
  94. #pinnedtablist:not(.compact) .tab,
  95. #tablist .tab {
  96. padding: 0;
  97. }
  98.  
  99. #newtab::after {
  100. content: "New tab";
  101. margin-left: 10px;
  102. white-space: nowrap;
  103. overflow: hidden;
  104. }
  105.  
  106. #newtab-icon {
  107. min-width: 16px;
  108. }
  109.  
  110.  
  111. /* the @media rule only allows these settings apply when the sidebar is expanded */
  112. @media (min-width: 49px) {
  113. /* Move close button to left side */
  114. /*.tab-close {
  115. left: 0;
  116. margin-left: 3px;
  117. }*/
  118.  
  119. /* Fix title gradient */
  120. /*#tablist .tab:hover > .tab-title-wrapper {
  121. mask-image: linear-gradient(to left, transparent 0, black 2em);
  122. }*/
  123.  
  124. /* Move tab text to right when hovering to accomodate for the close button */
  125. /*#tablist .tab:hover > .tab-title-wrapper {
  126. margin-left: 28px;
  127. transition: all 0.2s ease;
  128. }*/
  129.  
  130. /* Move favicon to right when hovering to accomodate for the close button */
  131. /*#tablist .tab:hover > .tab-meta-image {
  132. padding-left: 25px;
  133. transition: all 0.2s ease;
  134. }*/
  135. }
  136.  
  137.  
  138. /*** Move container indicators to left ***/
  139. #tablist-wrapper {
  140. margin-left: 0px;
  141. padding-left: 6px;
  142. }
  143. #tablist,
  144. #pinnedtablist:not(.compact) {
  145. margin-left: -6px;
  146. padding-left: 6px;
  147. }
  148. .tab {
  149. overflow: visible;
  150. }
  151. #tablist .tab[data-identity-color] .tab-context,
  152. #pinnedtablist:not(.compact) .tab[data-identity-color] .tab-context {
  153. box-shadow: none !important;
  154. }
  155. #tablist .tab[data-identity-color] .tab-context::before,
  156. #pinnedtablist:not(.compact) .tab[data-identity-color] .tab-context::before {
  157. content: "";
  158. position: absolute;
  159. top: 6px;
  160. left: -6px;
  161. bottom: 6px;
  162. width: 3px;
  163. border-radius: 0 5px 5px 0;
  164. background: var(--identity-color);
  165. transition: inset .1s;
  166. }
  167. #tablist .tab.active[data-identity-color] .tab-context::before,
  168. #pinnedtablist:not(.compact) .tab.active[data-identity-color] .tab-context::before {
  169. top: 1px;
  170. bottom: 1px;
  171. }
  172.  
  173. /* center favicons within the tab */
  174. #tablist-wrapper.shrinked>:not(#pinnedtablist.compact) .tab-meta-image {
  175. margin-left: 6px !important;
  176. }
  177.  
  178. /* hide certain items when collapsed */
  179. @media (max-width: 64px) {
  180. /* using 64px minimum width to give the tab favicons more room during the transition */
  181. .tab-close,
  182. .tab-pin {
  183. visibility: collapse !important;
  184. }
  185.  
  186. /* hide scrollbar when sidebar is collapsed */
  187. #tablist {
  188. scrollbar-width: none;
  189. }
  190. }
  191.  
  192. @media (max-width: 48px) {
  193. #settings-icon,
  194. #tablist-wrapper .tab-title-wrapper,
  195. #newtab::after,
  196. #settings {
  197. visibility: hidden !important;
  198. }
  199. }
  200.  
  201. /* Use mask for overflow instead of shadows */
  202. .can-scroll-top #tablist {
  203. mask: linear-gradient(transparent, black 40px);
  204. }
  205. .can-scroll-bottom #tablist {
  206. mask: linear-gradient(black calc(100% - 40px), transparent);
  207. }
  208. .can-scroll-bottom.can-scroll-top #tablist {
  209. mask: linear-gradient(transparent, black 40px calc(100% - 40px), transparent);
  210. }
  211. #topshadow, #bottomshadow {
  212. display: none;
  213. }
  214.  
  215. /* Prevent showing scrollbar when adding/removing tabs */
  216. #tablist-wrapper:not(.can-scroll-bottom):not(.can-scroll-top) #tablist {
  217. overflow: hidden;
  218. }
  219.  
  220. /*** Prevent Favicon-only pinned tabs from wrapping ***/
  221. #pinnedtablist.compact {
  222. flex-wrap: nowrap;
  223. overflow-x: auto;
  224. gap: 2px;
  225. }
  226. #pinnedtablist.compact:not(:hover):not(:focus-within) { /* Prevent scrollbar from showing when transitioning */
  227. scrollbar-width: none;
  228. }
  229. #pinnedtablist.compact .tab {
  230. min-width: 36px;
  231. }
  232. @media (max-width: 48px) {
  233. #pinnedtablist.compact {
  234. overflow-x: clip /* Clip always makes it reset scroll position */
  235. }
  236. #pinnedtablist.compact .tab.active {
  237. order: -1
  238. }
  239. }
  240.  
  241. /*** Better support for non-compact mode ***/
  242. #tablist-wrapper:not(.shrinked) .tab-meta-image {
  243. display: flex;
  244. align-items: center;
  245.  
  246. width: 58px;
  247. border: 0 !important;
  248. margin-right: 4px;
  249. border-radius: inherit;
  250. background-position: center;
  251. min-width: 0px !important;
  252. background-color: var(--toolbar-background) !important;
  253. transition: margin .4s;
  254. }
  255. #tablist-wrapper:not(.shrinked) .tab-icon-wrapper {
  256. transition: margin .1s;
  257. z-index: 2;
  258. }
  259. #tablist-wrapper:not(.shrinked) .tab-icon-overlay {
  260. top: unset !important;
  261. bottom: 8px;
  262. left: 25px !important;
  263. z-index: 4;
  264. transition: inset .1s;
  265. }
  266.  
  267. /* If you want to disable the website previews,
  268. comment out the @media line below and its closing bracket */
  269. @media (max-width: 49px) {
  270. #tablist-wrapper:not(.shrinked) .tab-meta-image {
  271. background-color: inherit !important;
  272. border-width: 0 !important;
  273. box-shadow: none !important;
  274. height: 0 !important;
  275. width: 26px;
  276. margin-right: 0px;
  277. }
  278. #tablist-wrapper:not(.shrinked) .tab-icon-wrapper {
  279. background-color: transparent !important;
  280. margin-top: 0 !important;
  281. margin-left: 3px !important;
  282. box-shadow: none !important;
  283. }
  284. #tablist-wrapper:not(.shrinked) .tab-icon-overlay {
  285. bottom: 12px;
  286. left: 16px !important;
  287. }
  288. }
  289.  
  290. /* middle click newtab workaround */
  291.  
  292. /* allows the #spacer element to take up more space */
  293. #spacer {
  294. min-height: 100vh;
  295. }
  296.  
  297. /* moves the new tab button to the original position */
  298. #tablist-wrapper {
  299. margin-bottom: -100vh;
  300. }
  301.  
  302. /* moves the new tab button separator to the original position */
  303. #tablist-wrapper::after {
  304. transform: translateY(-100vh);
  305. }
  306.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement