Guest User

Untitled

a guest
Nov 14th, 2021
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.18 KB | None | 0 0
  1. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/window_control_placeholder_support.css made available under Mozilla Public License v. 2.0
  2. See the above repository for updates as well as full license text. */
  3.  
  4. /* Creates placeholders for window controls */
  5. /* This is a supporting file used by other stylesheets */
  6.  
  7. /* This stylesheet is pretty much unnecessary if window titlebar is enabled */
  8.  
  9. /* This file should preferably be imported before other stylesheets */
  10.  
  11. /* Defaults for window controls on RIGHT side of the window */
  12.  
  13. /* Modify these values to match your preferences */
  14. :root[tabsintitlebar]{
  15. --uc-window-control-width: 138px; /* Space reserved for window controls (Win10) */
  16. /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
  17. --uc-window-drag-space-pre: 30px; /* left side*/
  18. --uc-window-drag-space-post: 30px; /* right side*/
  19. }
  20.  
  21. :root[tabsintitlebar][sizemode="maximized"] {
  22. --uc-window-drag-space-pre: 0px; /* Remove pre space */
  23. }
  24.  
  25. @media (-moz-os-version: windows-win7), (-moz-os-version: windows-win8) {
  26. :root[tabsintitlebar] {
  27. --uc-window-control-width: 105px;
  28. }
  29. }
  30.  
  31. @media (-moz-gtk-csd-available) {
  32. :root[tabsintitlebar] {
  33. --uc-window-control-width: 84px;
  34. }
  35. }
  36.  
  37. /* macOS settings are further below */
  38. .titlebar-buttonbox, #window-controls{ color: var(--toolbar-color) }
  39. :root[sizemode="fullscreen"] .titlebar-buttonbox-container{ display: none }
  40. :root[sizemode="fullscreen"] #navigator-toolbox { position: relative; }
  41.  
  42. :root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
  43. :root[sizemode="fullscreen"] #window-controls{
  44. position: absolute;
  45. display: flex;
  46. top: 0;
  47. right:0;
  48. height: 40px;
  49. }
  50.  
  51. :root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
  52. :root[uidensity="compact"][sizemode="fullscreen"] #window-controls{ height: 32px }
  53.  
  54. #nav-bar{
  55. border-inline: var(--uc-window-drag-space-pre,0px) solid var(--toolbar-bgcolor);
  56. border-inline-style: solid !important;
  57. border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px));
  58. }
  59.  
  60. /* Use this pref to check Mac OS where window controls are on left */
  61. /* This pref defaults to true on Mac and doesn't actually do anything on other platforms. So if your system has window controls on LEFT side you can set the pref to true */
  62. @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
  63. :root{ --uc-window-control-width: 72px; }
  64. :root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{
  65. border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px)) var(--uc-window-drag-space-pre,0px)
  66. }
  67. :root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container:last-child,
  68. :root[sizemode="fullscreen"] #window-controls{ right: unset }
  69. }
  70.  
  71. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/hide_tabs_toolbar.css made available under Mozilla Public License v. 2.0
  72. See the above repository for updates as well as full license text. */
  73.  
  74. /* Hides tabs toolbar */
  75. /* For OSX use hide_tabs_toolbar_osx.css instead */
  76.  
  77. /* Note, if you have either native titlebar or menubar enabled, then you don't really need this style.
  78. * In those cases you can just use: #TabsToolbar{ visibility: collapse !important }
  79. */
  80.  
  81. /* IMPORTANT */
  82. /*
  83. Get window_control_placeholder_support.css
  84. Window controls will be all wrong without it
  85. */
  86.  
  87. :root[tabsintitlebar]{ --uc-toolbar-height: 40px; }
  88. :root[tabsintitlebar][uidensity="compact"]{ --uc-toolbar-height: 32px }
  89.  
  90. #TabsToolbar{ visibility: collapse !important }
  91.  
  92. :root[sizemode="fullscreen"] #TabsToolbar > :is(#window-controls,.titlebar-buttonbox-container){
  93. visibility: visible !important;
  94. z-index: 2;
  95. }
  96.  
  97. :root:not([inFullscreen]) #nav-bar{
  98. margin-top: calc(0px - var(--uc-toolbar-height,0px));
  99. }
  100.  
  101. :root[tabsintitlebar] #toolbar-menubar[autohide="true"]{
  102. min-height: unset !important;
  103. height: var(--uc-toolbar-height,0px) !important;
  104. position: relative;
  105. }
  106.  
  107. #toolbar-menubar[autohide="false"]{
  108. margin-bottom: var(--uc-toolbar-height,0px)
  109. }
  110.  
  111. :root[tabsintitlebar] #toolbar-menubar[autohide="true"] #main-menubar{
  112. -moz-box-flex: 1;
  113. -moz-box-align: stretch;
  114. background-color: var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor);
  115. background-clip: padding-box;
  116. border-right: 30px solid transparent;
  117. border-image: linear-gradient(to left, transparent, var(--toolbar-bgcolor,--toolbar-non-lwt-bgcolor) 30px) 20 / 30px
  118. }
  119.  
  120. #toolbar-menubar:not([inactive]){ z-index: 2 }
  121. #toolbar-menubar[autohide="true"][inactive] > #menubar-items {
  122. opacity: 0;
  123. pointer-events: none;
  124. margin-left: var(--uc-window-drag-space-pre,0px)
  125. }
  126.  
  127. /* Full Auto-show/hide Theme
  128.  
  129. Source: https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#full-auto-showhide-theme
  130.  
  131. */
  132.  
  133. /* Hide main tabs toolbar */
  134. #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
  135. opacity: 0;
  136. pointer-events: none;
  137. }
  138. #main-window:not([tabsintitlebar="true"]) #TabsToolbar {
  139. visibility: collapse !important;
  140. }
  141.  
  142. /* Sidebar min and max width removal */
  143. #sidebar {
  144. max-width: none !important;
  145. min-width: 0px !important;
  146. }
  147. /* Hide splitter, when using Tree Style Tab. */
  148. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
  149. display: none !important;
  150. }
  151. /* Hide sidebar header, when using Tree Style Tab. */
  152. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
  153. visibility: collapse;
  154. }
  155.  
  156. /* Shrink sidebar until hovered, when using Tree Style Tab. */
  157. :root {
  158. --thin-tab-width: 30px;
  159. --wide-tab-width: 200px;
  160. }
  161. #sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) {
  162. min-width: var(--wide-tab-width) !important;
  163. max-width: none !important;
  164. }
  165. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  166. position: relative !important;
  167. transition: all 100ms !important;
  168. min-width: var(--thin-tab-width) !important;
  169. max-width: var(--thin-tab-width) !important;
  170. }
  171. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover {
  172. transition: all 200ms !important;
  173. transition-delay:0.2s !important; /* delay expand for some time */
  174. min-width: var(--wide-tab-width) !important;
  175. max-width: var(--wide-tab-width) !important;
  176. margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important;
  177. z-index: 1;
  178. }
  179.  
  180. /* Auto-hide sidebar when fullscreen */
  181.  
  182. #main-window[inFullscreen] #sidebar-box,
  183. #main-window[inFullscreen] #sidebar-splitter {
  184. display: none !important;
  185. width: 0px !important;
  186. }
  187.  
  188. /* Auto-hide sidebar in windows with only one tab (requires another extension) */
  189.  
  190. #main-window[titlepreface^="[1] "] #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  191. visibility: collapse !important;
  192. }
  193.  
  194. /* Remove white flash on load in dark Windows theme
  195.  
  196. Source: https://github.com/piroor/treestyletab/issues/1714
  197.  
  198. */
  199. #sidebar,
  200. #sidebar-box,
  201. #webextpanels-window,
  202. #webext-panels-browser {
  203. background: var(--primary-dark-color) !important;
  204. }
  205.  
  206.  
  207.  
  208. /* Remove "Extension (Tabliss)" from the search bar
  209.  
  210. Source: https://old.reddit.com/r/FirefoxCSS/comments/myypur/how_can_i_remove_extension_tabliss_from_the/
  211.  
  212. */
  213.  
  214. #identity-box.extensionPage
  215. #identity-icon[tooltiptext="Loaded by extension: Tabliss"]
  216. ~ #identity-icon-label {
  217. display: none !important;
  218. }
  219.  
  220. #identity-icon-box {
  221. background: none !important;
  222. }
  223.  
  224. /* Remove extension icon from Tabliss from the search bar as well */
  225.  
  226. #identity-box.extensionPage
  227. #identity-icon[tooltiptext="Loaded by extension: Tabliss"],
  228. #urlbar[pageproxystate="invalid"]
  229. #identity-box
  230. #identity-icon,
  231. #tracking-protection-icon-container[hidden]
  232. ~ #identity-box[pageproxystate="valid"].notSecure:not(.chromeUI, .localResource)
  233. #identity-icon {
  234. fill-opacity: var(--urlbar-icon-fill-opacity) !important;
  235. list-style-image: url(chrome://global/skin/icons/search-glass.svg) !important;
  236. }
  237.  
Advertisement
Add Comment
Please, Sign In to add comment