Advertisement
Guest User

Untitled

a guest
May 16th, 2023
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.47 KB | None | 0 0
  1. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/non_floating_sharp_tabs.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. /* This style makes tabs and related items non-rounded and connects tabs to toolbars like in previous Firefox versions.
  5. * You should set layout.css.color-mix.enabled to true in about:config to make colors apply properly.
  6. * It's not strictly a requirement, but this style expects compact_proton.css to be loaded before it. */
  7.  
  8. :root[id]{
  9. --tab-block-margin: 0px !important;
  10. --tabs-shadow-size: 1px !important;
  11.  
  12. /* Remove next line if you want selected tab to have color other than toolbar background - then it follows your theme color */
  13. --lwt-selected-tab-background-color: var(--toolbar-bgcolor) !important;
  14. }
  15.  
  16. .tabbrowser-tab:not([pinned]):hover .tab-close-button { display: flex;}
  17.  
  18. /* Uncomment next line to force specific color for tab top line */
  19. /* #tabbrowser-tabs{ --lwt-tab-line-color: blue !important; } */
  20.  
  21. /* These next two rules set a color for border around tabs and between tabs & navigation toolbars. Set to transparent to remove the border.*/
  22. #nav-bar{
  23. /* This overrides value in compact_proton.css */
  24. box-shadow: 0 -1px 0 0 color-mix(in srgb, currentcolor 30%, transparent) !important;
  25. }
  26. .tab-background[selected]{
  27. border-inline: 1px solid color-mix(in srgb, currentcolor 30%, transparent) !important;
  28. border-bottom-color: transparent !important;
  29. }
  30.  
  31. /* Reduce close button's padding for less wasted space */
  32. .tab-close-button.close-icon {
  33. padding-left: 0 !important;
  34. padding-right: 3px !important;
  35. }
  36.  
  37. #TabsToolbar{
  38. --toolbarbutton-inner-padding: 7px !important;
  39. }
  40. /* Few exceptions for default light theme */
  41. #navigator-toolbox:not([movingtab]):-moz-lwtheme > #titlebar > #TabsToolbar{
  42. --toolbar-bgcolor: transparent;
  43. }
  44.  
  45. .tab-background[selected]:not(:-moz-lwtheme){ background: var(--toolbar-bgcolor) !important; }
  46.  
  47. #TabsToolbar .toolbarbutton-1 > .toolbarbutton-badge-stack,
  48. #TabsToolbar .toolbarbutton-1 > .toolbarbutton-icon{ border-radius: 2px !important; }
  49.  
  50. /* tabs newtab button needs some special styling... */
  51. #tabs-newtab-button{ padding-inline: 0 !important; }
  52. #tabbrowser-arrowscrollbox > #tabs-newtab-button > .toolbarbutton-icon{
  53. border-radius: 0 !important;
  54. width: initial !important;
  55. height: initial !important;
  56. padding: 9px !important;
  57. }
  58. :root[uidensity="compact"] #tabbrowser-arrowscrollbox > #tabs-newtab-button > .toolbarbutton-icon{
  59. padding: 7px !important;
  60. }
  61.  
  62. #scrollbutton-up,
  63. #scrollbutton-down{ border-radius: 0 !important; border-width: 0 !important; padding-inline: 3px !important; }
  64.  
  65. /* tab shaping */
  66. .tabbrowser-tab{ padding-inline: 0 !important; }
  67.  
  68. :root[uidensity="compact"] #tabbrowser-tabs[positionpinnedtabs] .tabbrowser-tab[pinned]{ min-height: calc(var(--tab-min-height) + 2px) !important; }
  69.  
  70. .tab-content[pinned]{ padding-inline: 11px !important; }
  71.  
  72. .tab-background{
  73. border-radius: 0 !important;
  74. box-shadow: none !important;
  75. border-top: 0 !important;
  76. }
  77.  
  78. .tab-background:not([selected])[multiselected]{
  79. background: color-mix(in srgb, currentColor 11%, transparent) !important;
  80. margin-inline-start: -1px;
  81. }
  82.  
  83. /* Line to mark selected tab */
  84. .tab-background[selected]::before,
  85. .tabbrowser-tab:hover > stack > .tab-background::before{
  86. display: -moz-box;
  87. height: 2px;
  88. content: "";
  89. }
  90.  
  91. .tab-stack:hover > .tab-background::before{
  92. background-color: inherit;
  93. }
  94. .tab-stack > .tab-background[selected]::before{
  95. background-color: highlight;
  96. background-image: linear-gradient(var(--lwt-tab-line-color),var(--lwt-tab-line-color));
  97. }
  98. /* Photon-like tab on hover animation for the top line */
  99. @keyframes tab-onhover-line-anim{ from{ margin-inline: 20px } to { margin-inline: 0 } }
  100.  
  101. .tab-stack:hover > .tab-background::before{ animation: tab-onhover-line-anim 160ms }
  102.  
  103. /* Disable animation for selected and pinned tabs */
  104. .tabbrowser-tab:is([pinned],[selected]) > .tab-stack > .tab-background::before{ animation: none }
  105.  
  106. /* moves context-line to the bottom */
  107. .tab-context-line{ -moz-box-ordinal-group: 2; margin-inline: 10px !important; }
  108.  
  109. /* Set minimum width below which tabs will not shrink (minimum 22px) */
  110. :root {
  111. --my-tab-min-width: 16px;
  112. }
  113.  
  114. /* Adjust padding for better centering and less wasted space */
  115. .tabbrowser-tab:not([pinned]) .tab-content{
  116. padding-left: calc((var(--my-tab-min-width) - 22px)/2) !important;
  117. padding-right: calc((var(--my-tab-min-width) - 22px)/2) !important;
  118. }
  119.  
  120. /*** Tighten up drop-down/context/popup menu spacing (8 Sep 2021) ***/
  121.  
  122. menupopup:not(.in-menulist) > menuitem,
  123. menupopup:not(.in-menulist) > menu {
  124. padding-block: 2px !important; /* reduce to 3px, 2px, 1px or 0px as needed */
  125. min-height: unset !important; /* v92.0 - for padding below 4px */
  126. }
  127. :root {
  128. --arrowpanel-menuitem-padding: 4px 8px !important; }
  129.  
  130. .tabbrowser-tab:not([pinned="true"]):hover .tab-icon-image,
  131. .tabbrowser-tab:not([pinned="true"]):hover .tab-throbber {
  132. display: none;
  133. }
  134.  
  135. .tabbrowser-tab:not([pinned="true"]):hover .tab-close-button {
  136. display: -moz-box !important;
  137. }
  138.  
  139. /* Essential rule for reducing minimum tab width */
  140. .tabbrowser-tab:not([pinned]){
  141. min-width: var(--my-tab-min-width) !important;
  142. }
  143.  
  144. /* Optional rules for widths below 40px */
  145. /* Reduce icon's right margin for less wasted space */
  146. .tabbrowser-tab:not([pinned]) .tab-icon-image {
  147. margin-right: 1px !important;
  148. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement