autohide sidebar: Add option for fixed-layout sidebar via pref
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
|
||||
See the above repository for updates as well as full license text. */
|
||||
|
||||
/* Show sidebar only when the cursor is over it */
|
||||
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
|
||||
/* Show sidebar only when the cursor is over it.
|
||||
The border controlling sidebar width will be removed so you'll need to modify
|
||||
these values to change width.
|
||||
By default the internal layout of sidebar changes when hovered, but this can
|
||||
be changed by setting pref "userchrome.autohide-sidebar.static-layout.enabled" to true
|
||||
*/
|
||||
|
||||
/* Note: If you want only *some* sidebar to be auto-hidden, then you can use [sidebarcommand] attribute selector.
|
||||
For example, to only affect Sidebery's sidebar replace all instances of #sidebar-box with
|
||||
@@ -101,3 +105,35 @@ See the above repository for updates as well as full license text. */
|
||||
margin-inline: 0px !important;
|
||||
border-left-style: solid !important;
|
||||
}
|
||||
@media -moz-pref("userchrome.autohide-sidebar.static-layout.enabled"){
|
||||
#sidebar-box{
|
||||
min-width: var(--uc-sidebar-width) !important;
|
||||
contain: size;
|
||||
box-shadow: var(--content-area-shadow);
|
||||
}
|
||||
:root:not([inDOMFullscreen]) #tabbrowser-tabbox:not([sidebar-positionend]){
|
||||
margin-inline: var(--uc-sidebar-width) 0;
|
||||
}
|
||||
#sidebar-box:not([sidebar-positionend]){
|
||||
position: absolute !important;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
|
||||
&:hover{
|
||||
min-width: var(--uc-sidebar-hover-width) !important;
|
||||
transition-delay: 0ms !important;
|
||||
}
|
||||
}
|
||||
#sidebar{
|
||||
min-width: var(--uc-sidebar-hover-width) !important;
|
||||
will-change: unset !important;
|
||||
}
|
||||
#sidebar[sidebar-positionend]{
|
||||
transform: translateX(calc(var(--uc-sidebar-hover-width) - var(--uc-sidebar-width)));
|
||||
transition-property: transform !important;
|
||||
&:hover{
|
||||
transform: translateX(0);
|
||||
transition-delay: 0ms !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user