psaras1

Untitled

May 18th, 2024
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 3.17 KB | None | 0 0
  1. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_bookmarks_toolbar.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. #PersonalToolbar{
  5.   --uc-bm-height: 20px; /* Might need to adjust if the toolbar has other buttons */
  6.   --uc-bm-padding: 4px; /* Vertical padding to be applied to bookmarks */
  7.   --uc-autohide-toolbar-delay: 200ms; /* The toolbar is hidden after 0.6s */
  8.  
  9.   /* 0deg = "show" ; 90deg = "hide" ;  Set the following to control when bookmarks are shown */
  10.   --uc-autohide-toolbar-focus-rotation: 0deg; /* urlbar is focused */
  11.   --uc-autohide-toolbar-hover-rotation: 0deg; /* cursor is over the toolbar area */
  12. }
  13.  
  14. :root[uidensity="touch"] #PersonalToolbar{ --uc-bm-padding: 7px }
  15.  
  16. #PersonalToolbar:not([customizing]){
  17.   position: relative;
  18.   margin-bottom: calc(-1px - var(--uc-bm-height) - 2 * var(--uc-bm-padding));
  19.   transform: rotateX(90deg);
  20.   transform-origin: top;
  21.   transition: transform 135ms linear var(--uc-autohide-toolbar-delay) !important;
  22.   z-index: 1;
  23.   /* The following properties should allow the themes with trasparent toolbars to work */
  24.   background-color: transparent !important;
  25.   background-repeat: no-repeat,no-repeat,var(--lwt-background-tiling);
  26.     /* y position will be wrong if menubar is enabled... */
  27.   --uc-bg-y: calc(-2 * (var(--tab-block-margin) + var(--toolbarbutton-inner-padding) + var(--toolbarbutton-outer-padding)) - var(--tab-min-height) - 24px - var(--bookmark-block-padding));
  28.   background-position: top left,top left,var(--lwt-background-alignment,top left);
  29.   background-position-y:top,top,var(--uc-bg-y),var(--uc-bg-y),var(--uc-bg-y);
  30.   background-image: var(--toolbar-bgimage,linear-gradient(transparent,transparent)), linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image,var(--lwt-additional-images)) !important;
  31. }
  32. :root[uidensity="compact"] #PersonalToolbar{
  33.   --toolbarbutton-outer-padding: 1px !important;
  34. }
  35. #PlacesToolbarItems > .bookmark-item,
  36. #OtherBookmarks,
  37. #PersonalToolbar > #import-button{
  38.   padding-block: var(--uc-bm-padding) !important;
  39. }
  40.  
  41. #nav-bar:focus-within + #PersonalToolbar{
  42.   transition-delay: 100ms !important;
  43.   transform: rotateX(var(--uc-autohide-toolbar-focus-rotation,0));
  44. }
  45. #navigator-toolbox:is(:hover,:focus-within){
  46.   border-bottom-color: transparent !important;
  47. }
  48. #navigator-toolbox:hover > #PersonalToolbar{
  49.   transition-delay: 100ms !important;
  50.   transform: rotateX(var(--uc-autohide-toolbar-hover-rotation,0));
  51. }
  52.  
  53. #navigator-toolbox:hover > #nav-bar:focus-within + #PersonalToolbar {  
  54.   transform: rotateX(0);
  55. }
  56.  
  57. /* Uncomment to enable compatibility for multi-row_bookmarks.css */
  58. /* This would break buttons placed in the toolbar but that is likely not happening if you are using multi-row setup  */
  59. /*
  60. #PersonalToolbar:not([customizing]){
  61.   min-height: 0 !important;
  62.   margin-bottom: 0;
  63.   height: 0;
  64.   overflow-y: visible !important;
  65.   z-index: 2;
  66.   padding-inline: 0 !important;
  67. }
  68. #personal-bookmarks{
  69.   background: inherit;
  70.   height: min-content;
  71. }
  72. #PlacesToolbarDropIndicatorHolder{
  73.   pointer-events: none !important;
  74. }
  75. */
Advertisement
Add Comment
Please, Sign In to add comment