Advertisement
difool2nice

nav-br bookmark autohide

Jul 21st, 2018
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.52 KB | None | 0 0
  1. /*
  2. * Auto-hide the URL-bar and bookmarks bar, show on hover or focus
  3. *
  4. * Contributor(s): Alex Vallat
  5. */
  6.  
  7. :root[uidensity=compact] #navigator-toolbox {
  8.     --nav-bar-height: 33px;
  9.     --tab-min-height: 29px;
  10. }
  11.  
  12.  
  13. :root:not([uidensity]) #navigator-toolbox {
  14.     --nav-bar-height: 39px;
  15.     --tab-min-height: 33px;
  16. }
  17.  
  18. :root[uidensity=touch] #navigator-toolbox {
  19.     --nav-bar-height: 41px;
  20.     --tab-min-height: 41px;
  21. }
  22.  
  23. #navigator-toolbox {
  24.     --tabbar-height: calc(var(--tab-min-height) + var(--space-above-tabbar));
  25.     --trigger-area-height: 5px;
  26. }
  27.  
  28. :root[chromehidden~="toolbar"] #navigator-toolbox {
  29.     --tabbar-height: 0.1px;
  30. }
  31.  
  32. #toolbar-menubar {
  33.     margin-top: 0px !important;
  34. }
  35.  
  36. /* Undo add of 4px extra margin on top of the tabs toolbar on Windows 7. */
  37. /* Note: @media -moz-os-version does not work in userChrome.css (https://bugzilla.mozilla.org/show_bug.cgi?id=1418963) */
  38. :root[sizemode="normal"][chromehidden~="menubar"] #TabsToolbar,
  39. :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar {
  40.     padding-top: var(--space-above-tabbar) !important;
  41. }
  42.  
  43. #nav-bar, #PersonalToolbar {*/
  44.       /* Otherwise spacers will not count as hover-able areas */
  45.       -moz-window-dragging: default;
  46. }
  47.  
  48. :root:not([customizing]) #nav-bar  {
  49.     overflow-y: hidden;
  50.     max-height:0;
  51.     min-height:0 !important;
  52.     padding-top:0 !important;
  53.     padding-bottom:0 !important;
  54.     opacity: 0;
  55. }
  56.  
  57. :root:not([customizing]) :hover > #nav-bar,
  58. :root:not([customizing]) #nav-bar:focus-within {
  59.     max-height: var(--nav-bar-height);
  60.     opacity: 1;
  61.     transition: opacity 0.15s ease-in, max-height 0.15s linear;
  62. }
  63.  
  64. :root:not([customizing]) #navigator-toolbox {
  65.     max-height: calc(var(--tabbar-height) + var(--trigger-area-height));
  66.     min-height: var(--tabbar-height);
  67.     margin-bottom: calc(-1 * var(--trigger-area-height));
  68. }
  69.  
  70. :root:not([customizing]) #navigator-toolbox:hover,
  71. :root:not([customizing]) #navigator-toolbox:focus-within {
  72.     max-height: calc(var(--tabbar-height) + var(--nav-bar-height));
  73.     margin-bottom: calc(0px - var(--nav-bar-height));
  74. }*/
  75.  
  76. /* If the bookmarks bar is turned on, auto-hide that too */
  77. :root:not([customizing]) #PersonalToolbar {
  78.     max-height: 0 !important;
  79.     min-height: 0.1px !important;
  80.     opacity: 0;
  81.     transition: opacity 0.15s ease-in !important;
  82. }
  83.  
  84. :root:not([customizing]) :hover > #PersonalToolbar,
  85. :root:not([customizing]) #navigator-toolbox:focus-within #PersonalToolbar {
  86.     max-height: 4em !important;
  87.     opacity: 1;
  88. }
  89.  
  90. /* Lightweight Theme Support */
  91. :root:-moz-lwtheme #nav-bar,
  92. :root:-moz-lwtheme #PersonalToolbar {
  93.  background-color: var(--lwt-accent-color) !important;
  94.  background-image: var(--lwt-header-image), var(--lwt-additional-images) !important;
  95.  background-position: var(--lwt-background-alignment) !important;
  96.  background-repeat: var(--lwt-background-tiling) !important;
  97. }
  98.  
  99. #main-window[sizemode="normal"]:-moz-lwtheme #nav-bar {
  100.    background-position-y: calc(-2px - var(--tabbar-height)) !important;
  101. }
  102. #main-window[sizemode="normal"]:-moz-lwtheme #PersonalToolbar {
  103.    background-position-y: calc(-2px - var(--tabbar-height) - var(--nav-bar-height)) !important;
  104. }
  105.  
  106. #main-window[sizemode="maximized"]:-moz-lwtheme #nav-bar {
  107.    background-position-y: calc(-8px - var(--tabbar-height)) !important;
  108. }
  109.  
  110. #main-window[sizemode="maximized"]:-moz-lwtheme #PersonalToolbar {
  111.    background-position-y: calc(-8px - var(--tabbar-height) - var(--nav-bar-height)) !important;
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement