Guest User

sidebar.css

a guest
Jun 13th, 2025
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. /* Auto Hide Tree Style Tab */
  2.  
  3. /* Hide splitter, when using Tree Style Tab. This rule removes the sidebar splitter when Tree Style Tab is active. */
  4. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
  5. display: none !important;
  6. }
  7.  
  8. /* Hide sidebar header, when using Tree Style Tab. This rule hides the header of the sidebar when Tree Style Tab is active. */
  9. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
  10. visibility: collapse;
  11. }
  12.  
  13. /* Shrink sidebar until hovered, when using Tree Style Tab. */
  14. #sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) {
  15. min-width: var(--wide-tab-width) !important; /* Set a minimum width for the sidebar */
  16. max-width: none !important; /* Remove any maximum width restrictions */
  17. }
  18.  
  19. /* Configure sidebar appearance when Tree Style Tab is active. */
  20. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  21. overflow: hidden !important; /* Prevents overflow */
  22. position: relative !important; /* Positions the sidebar relative to the parent */
  23. transition: all 200ms !important; /* Smooth transition for changes */
  24. min-width: var(--thin-tab-width) !important; /* Set a minimum width for the sidebar */
  25. max-width: var(--thin-tab-width) !important; /* Set a maximum width for the sidebar */
  26. z-index: 3; /* Layering order to ensure visibility */
  27. }
  28.  
  29. /* Expand the sidebar when hovered. */
  30. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover,
  31. #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar {
  32. transition: all 200ms !important; /* Smooth transition for changes */
  33. min-width: var(--wide-tab-width) !important; /* Expand the sidebar width */
  34. max-width: var(--wide-tab-width) !important; /* Expand the sidebar width */
  35. margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important; /* Adjust positioning */
  36. z-index: 3; /* Layering order to ensure visibility */
  37. }
  38.  
  39. /* Define custom width variables */
  40. :root {
  41. --thin-tab-width: 35px; /* Width of the sidebar when not hovered */
  42. --wide-tab-width: 250px; /* Width of the sidebar when hovered */
  43. }
  44.  
  45. /* Auto Hide Tree Style Tab Finished */
Advertisement
Add Comment
Please, Sign In to add comment