-
Notifications
You must be signed in to change notification settings - Fork 3
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
Matching Firefox and Webkit styles #4
Comments
Hi @philipbordallo, thanks a lot for the feedback and research!
So to narrow the scope if this plugin I would say it should (if possible):
I'll run some more testing this week on MacOs and some another round of research. I'll keep you posted. |
@pascalduez That's what I was assuming, that being consistent across multiple operating systems is going be tough. macOS StylesmacOS scrollbars do not always disappear, it depends on what scrollbar setting the user has. The three mode settings for showing scrollbars are:
If there is no style given, Safari, Chrome, and Firefox all act pretty consistently:
With styles given things get a bit different:
Thin SizingI just took a screenshot of the Firefox version and measured the pixels, which ended up being 11px for macOS. It might be a good idea to collect measurements across different operating systems and pick a length based on that list. Regardless I'd go with a fixed length instead of |
Agree, I will do that. Let's use this little pen to grab the thin scrollbar size. Results: Linux (Ubuntu Gnome) Windows 10 TBC... |
Currently the transformed Webkit scrollbar styles are very basic and do not match what's rendered in Firefox. Does it make sense to try and match the styles that occur in Firefox to Webkit?
At least with Firefox on macOS,
scrollbar-width: thin
renders to11px
. Currently postcss-scrollbar is translating it to.5rem
, which for when the root font-size is16px
it ends up as8px
but because it's using rem it is affected by whatever that root font-size is. For example,font-size: 32px
means the scrollbars would be16px
.Again on macOS, Firefox gives the thumb a border-radius and some spacing that can be replicated using borders and border-radius, it's not perfect but it's doable.
Here's pen of what's possible: https://codepen.io/philipbordallo/pen/mvevry
The text was updated successfully, but these errors were encountered: