-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to auto-hide vertical scrollbar #1923
Comments
#tabbar.overflow {
margin-right: -16px;
}
#tabbar:hover {
margin-right: 0px;
} |
That's great, but the transitions doesn't work :( |
How about this? :root.left-scrollbar #tabbar.overflow {
margin-left: calc(0px - var(--scrollbar-size));
transition: margin-left ease 0.25s 0.4s;
}
:root.right-scrollbar #tabbar.overflow {
margin-right: calc(0px - var(--scrollbar-size));
transition: margin-right ease 0.25s 0.4s;
}
:root.left-scrollbar #tabbar.overflow:hover {
margin-left: 0;
}
:root.right-scrollbar #tabbar.overflow:hover {
margin-right: 0;
}
:root.left-scrollbar.narrow-scrollbar #tabbar.overflow:hover {
margin-left: calc(var(--narrow-scrollbar-size) - var(--scrollbar-size));
}
:root.right-scrollbar.narrow-scrollbar #tabbar.overflow:hover {
margin-right: calc(var(--narrow-scrollbar-size) - var(--scrollbar-size));
} |
this one doesn't hide it at all |
How it broken? It works on my environment as expected so I cannot imagine how I should "fix" it. Could you attach screenshots? |
I cleaned up some code in the Extra style rules and now it works! Probably something left over like a bracket. |
I've added the code to the snippets: https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#auto-hide-scrollbar-1923 |
For me This works for me, replacing all :root.left-scrollbar #tabbar.overflow {
left: calc(0px - var(--scrollbar-size));
transition: left ease 0.25s 0.4s;
}
:root.right-scrollbar #tabbar.overflow {
right: calc(0px - var(--scrollbar-size));
transition: right ease 0.25s 0.4s;
}
:root.left-scrollbar #tabbar.overflow:hover {
left: 0;
}
:root.right-scrollbar #tabbar.overflow:hover {
right: 0;
}
:root.left-scrollbar.narrow-scrollbar #tabbar.overflow:hover {
left: calc(var(--narrow-scrollbar-size) - var(--scrollbar-size));
}
:root.right-scrollbar.narrow-scrollbar #tabbar.overflow:hover {
right: calc(var(--narrow-scrollbar-size) - var(--scrollbar-size));
} |
My fix above now no longer works since the most recent update of TST or Firefox; it now makes tab labels invisible: #2200 (comment) |
It looks like the automatic calculation of the offset using I've made it work hardcoding some pixels (including only the case where the scrollbar is on the left, as I couldn't make it work with the snippet that puts the bar on the right): /* Auto hide scrollbar */
:root.left-scrollbar #tabbar.overflow {
left: -5px; /* calc(0px - var(--scrollbar-size)); */
transition: left ease 0.25s 0.4s;
}
:root.left-scrollbar #tabbar.overflow:hover {
margin-left: 0;
}
:root.left-scrollbar.narrow-scrollbar #tabbar.overflow:hover {
left: 0px; /* calc(var(--narrow-scrollbar-size) - var(--scrollbar-size)); */
} |
The scrollbar in the sidebar is now controlled with the CSS property |
@piroor Thank you, that works well! |
Can anyone still confirm this snippet still works? (Obviously the 3.0.5+ version) I was reviewing my TST CSS and saw that I had it in there, but my scrollbar was always being displayed. (FF 70.0.1 \ TST 3.2.5) |
For my situation, I found a simplified solution that works nicely using the "none", "thin", and "auto" standard values.
|
Can you please add an option or CSS so that the vertical scrollbar auto-hides (and show it on mouse scroll for example)
Thank you.
The text was updated successfully, but these errors were encountered: