Advertisement
Guest User

s4k - autohide_sidebar.css

a guest
Dec 3rd, 2024
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | Source Code | 0 0
  1. /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.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. /* Show sidebar only when the cursor is over it */
  5. /* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
  6.  
  7. #sidebar-box{
  8. --uc-sidebar-width: var(--as-w); /* userChrome.css */
  9. --uc-sidebar-hover-width: var(--as-w-hover); /* userChrome.css */
  10. --uc-autohide-sidebar-delay: var(--as-delay); /* userChrome.css */
  11. --uc-autohide-transition-duration: var(--as-duration); /* userChrome.css */
  12. --uc-autohide-transition-type: var(--as-type); /* userChrome.css */
  13. --browser-area-z-index-sidebar: 3;
  14. position: relative;
  15. min-width: var(--uc-sidebar-width) !important;
  16. width: var(--uc-sidebar-width) !important;
  17. max-width: var(--uc-sidebar-width) !important;
  18. z-index: var(--browser-area-z-index-sidebar,3);
  19. }
  20. #sidebar-box[positionend]{ direction: rtl }
  21. #sidebar-box[positionend] > *{ direction: ltr }
  22.  
  23. #sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
  24. #sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
  25.  
  26. #main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; }
  27.  
  28. #sidebar-splitter{ display: none }
  29.  
  30. #sidebar-header{
  31. overflow: hidden;
  32. color: var(--chrome-color, inherit) !important;
  33. padding-inline: 0 !important;
  34. height: 0px !important;
  35. }
  36.  
  37. #sidebar-header::before,
  38. #sidebar-header::after{
  39. content: "";
  40. display: flex;
  41. padding-left: 8px;
  42. }
  43.  
  44. #sidebar-header,
  45. #sidebar{
  46. transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
  47. min-width: var(--uc-sidebar-width) !important;
  48. will-change: min-width;
  49. }
  50. #sidebar-box:hover > #sidebar-header,
  51. #sidebar-box:hover > #sidebar{
  52. min-width: var(--uc-sidebar-hover-width) !important;
  53. transition-delay: 0ms !important;
  54. }
  55.  
  56. .sidebar-panel{
  57. background-color: transparent !important;
  58. color: var(--newtab-text-primary-color) !important;
  59. }
  60.  
  61. .sidebar-panel #search-box{
  62. -moz-appearance: none !important;
  63. background-color: rgba(249,249,250,0.1) !important;
  64. color: inherit !important;
  65. }
  66.  
  67. /* Add sidebar divider and give it background */
  68.  
  69. #sidebar,
  70. #sidebar-header{
  71. background-color: inherit !important;
  72. border-inline: 1px solid rgb(80,80,80);
  73. border-inline-width: 0px 1px;
  74. }
  75.  
  76. #sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
  77. #sidebar-box[positionend] > *{
  78. border-inline-width: 1px 0px;
  79. }
  80.  
  81. /* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
  82.  
  83. #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{
  84. inset-inline: auto 0px !important;
  85. }
  86. #sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{
  87. margin-inline: 0px !important;
  88. border-left-style: solid !important;
  89. }
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement