-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Thin scrollbars for Firefox #10554
Thin scrollbars for Firefox #10554
Conversation
@@ -5777,6 +5777,12 @@ li.hide + li.version .badge .tooltip .popover-arrow { | |||
body { | |||
scrollbar-width: 10px; | |||
} | |||
/* Firefox */ | |||
@-moz-document url-prefix() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation says @document
is deprecated and the prefixed version no longer works in author-defined stylesheets. Can we count on it to work on Firefox going forward?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, the browser compatibility table says it is supported for Firefox browser detection.
Maybe I'm missing something, but I don't see any other way. If we set scrollbar-width: thin;
for everyone, I don't think we can override it with ::-webkit-scrollbar
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, is the intention to avoid clobbering the width
here with whatever WebKit would use as thin
in its (currently experimental) implementation?
Lines 5749 to 5754 in d04c3cd
::-webkit-scrollbar { | |
height: 10px; | |
overflow: visible; | |
width: 10px; | |
border-left: 1px solid #DDD; | |
} |
I suppose this specific url-prefix
hack does still work, so it’s an improvement over the status quo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think the current WebKit scrollbar looks better, especially with the rounded borders, but I couldn’t find any way to achieve the same on Firefox.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution. As a longtime Firefox user, I had no idea the scrollbars were supposed to be thin!
@@ -5777,6 +5777,12 @@ li.hide + li.version .badge .tooltip .popover-arrow { | |||
body { | |||
scrollbar-width: 10px; | |||
} | |||
/* Firefox */ | |||
@-moz-document url-prefix() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, is the intention to avoid clobbering the width
here with whatever WebKit would use as thin
in its (currently experimental) implementation?
Lines 5749 to 5754 in d04c3cd
::-webkit-scrollbar { | |
height: 10px; | |
overflow: visible; | |
width: 10px; | |
border-left: 1px solid #DDD; | |
} |
I suppose this specific url-prefix
hack does still work, so it’s an improvement over the status quo.
Since Firefox doesn't use
::-webkit-
, we should usescrollbar-width: thin
to better match the style on Chrome.This doesn't override other
scrollbar-width: none
Chrome scrollbars:
Firefox scrollbars:
Firefox with thin scrollbars:
Also I’m quite sure the rule
body { scrollbar-width: 10px; }
doesn’t do anything because it’s unsupported and should be deleted.