Skip to content
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

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Thin scrollbars for Firefox #10554

merged 2 commits into from
Nov 25, 2024

Conversation

Nekzuris
Copy link
Contributor

Since Firefox doesn't use ::-webkit-, we should use scrollbar-width: thin to better match the style on Chrome.
This doesn't override other scrollbar-width: none

Chrome scrollbars:
image
Firefox scrollbars:
ff
Firefox with thin scrollbars:
ff_

Also I’m quite sure the rule body { scrollbar-width: 10px; } doesn’t do anything because it’s unsupported and should be deleted.

css/80_app.css Outdated Show resolved Hide resolved
@@ -5777,6 +5777,12 @@ li.hide + li.version .badge .tooltip .popover-arrow {
body {
scrollbar-width: 10px;
}
/* Firefox */
@-moz-document url-prefix() {
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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?

iD/css/80_app.css

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

@1ec5 1ec5 left a 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() {
Copy link
Collaborator

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?

iD/css/80_app.css

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.

@1ec5 1ec5 merged commit b5d45e3 into openstreetmap:develop Nov 25, 2024
3 checks passed
@Nekzuris Nekzuris deleted the patch-2 branch November 25, 2024 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants