minimal_toolbarbuttons.css 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/minimal_toolbarbuttons.css made available under Mozilla Public License v. 2.0
  2. See the above repository for updates as well as full license text. */
  3. /* Create a circular placeholder for toolbarbutton and downscale to hide them */
  4. /* Create a placeholder for buttons */
  5. toolbar .toolbarbutton-1:not([open]),
  6. .titlebar-button,
  7. #tabbrowser-tabs toolbarbutton,
  8. #scrollbutton-up:not(:hover),
  9. #scrollbutton-down:not(:hover){
  10. background-image: radial-gradient(circle at center, var(--toolbarbutton-icon-fill,currentColor) 0,var(--toolbarbutton-icon-fill,currentColor) 10%,transparent 15% );
  11. }
  12. /* Hide placeholder on hover */
  13. toolbar:hover + toolbar .toolbarbutton-1,
  14. vbox:hover + toolbar .toolbarbutton-1,
  15. toolbar:hover .toolbarbutton-1,
  16. #tabbrowser-tabs:hover toolbarbutton,
  17. .titlebar-buttonbox:hover > .titlebar-button{ background-image: none }
  18. toolbar .toolbarbutton-1 > *,
  19. .titlebar-button > *,
  20. #tabbrowser-tabs toolbarbutton > *{
  21. transform: scale(0);
  22. transition: transform 82ms linear !important;
  23. }
  24. #scrollbutton-up > .toolbarbutton-icon,
  25. #scrollbutton-down > .toolbarbutton-icon{ transform: scale(0) !important; transition: transform 82ms linear !important; }
  26. toolbar:hover + toolbar .toolbarbutton-1 > *,
  27. vbox:hover + toolbar .toolbarbutton-1 > *,
  28. toolbar:hover .toolbarbutton-1 > *,
  29. .toolbarbutton-1[open] > *,
  30. .titlebar-buttonbox:hover > .titlebar-button > *,
  31. #tabbrowser-tabs:hover toolbarbutton > *{
  32. transform: scale(1)
  33. }
  34. #scrollbutton-up:hover > .toolbarbutton-icon{ transform: scale(1) !important }
  35. #scrollbutton-down:hover > .toolbarbutton-icon{ transform: scale(-1) !important }
  36. /* Urlbar icons, this way they show colors is applicable */
  37. .urlbar-icon{ transition: transform 82ms linear !important; }
  38. #urlbar:not(:hover) .urlbar-icon:not([open]){ transform: scale(0.3) }
  39. /* The menu button has some margin on non-compact density which creates annnoying transitions */
  40. /* Lets remove that as well as border since this is minimal style anyway */
  41. #PanelUI-button{ border-left: 0px !important; margin-left: 0px !important; }
  42. /* Add a glow-effect to some buttons when it has some "alert" */
  43. #nav-bar:not(:hover) > #PanelUI-button > #PanelUI-menu-button[badge-status],
  44. #navigator-toolbox:not(:hover) #downloads-button[attention]{
  45. filter: brightness(2) drop-shadow(0 0 3px orange) drop-shadow(0 0 1px orange);
  46. }
  47. #nav-bar:not(:hover) > #PanelUI-button > #PanelUI-menu-button[badge-status^="update"],
  48. #navigator-toolbox:not(:hover) #downloads-button[attention="success"]{
  49. filter: brightness(2) drop-shadow(0 0 2px cyan) drop-shadow(0 0 1px cyan);
  50. }