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
[css-scrollbars-1] scrollbar-width should be inherited #4799
Comments
Yeah, those two should absolutely inherit the same way, either both or neither inheriting. |
It is intentional. The basic idea is that I'm not totally sure whether that assumption still makes sense, but it was intentionally done that way. |
Hm. I understand the argument for not inheriting the scrollbar-width property; it's a layout property, and we don't usually inherit those, for precisely this reason. But on the other hand, as the OP points out, inheriting makes it easier to have a consistent scrollbar design across a site, the same justification used for having scrollbar-color inherit. And the more general issue of two properties under the same prefix not having the same inheritance behavior still makes me very uncomfortable. I feel like we have one example of that in all of CSS and it's for a very special case (I forgot what, but I think it's related to text). |
I thought there are several but I think you're probably right that it's rare. So far I found |
See also:
And previous words by @upsuper...
Keeping in mind things like the |
I kind of see this as a downside. Overall, scrollbars are a matter of UI, which I think should be more of a user / UA / OS choice, than an author choice. To me, this properties is most strongly justified when allowing authors to say something like "this particular component is a small chat-box in the corner, it doesn't have much room, and narrow(er) scrollbars would be appropriate". I think it is less justified if it's about letting authors say "I think thin scrollbars are prettier". Ultimately, both will be possible anyway, and there's a big gray zone in the middle, but it seems to me that a non inherited property biases (slightly) towards the per component UX consideration, while an inherited one biases (slightly) towards overall esthetics, and so I'd rather keep it non inherited. |
Agenda+ to propose resolving as WONTFIX, for the reason stated in #4799 (comment) (Also, Firefox has been shipping it already, making changes less welcome) |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> Topic: scrollbar-width inheritance<fantasai> github: https://github.com//issues/4799#issuecomment-877482191 <fantasai> florian: Suggestion to switch scrollbar-width to inherited <fantasai> florian: for consistency with scrollbar-color and to make easier to style the whole page <fantasai> florian: and I think we should not do that or exactly that reason <TabAtkins> florian's argument in the thread makes sense to me, i'm fine with WONTFIX'ing this <fantasai> florian: Primary use case for global scrollbar width is author preference, not author preference <tantek> +1. disagreewith making scrollbar-width to inherited <fantasai> florian: but author might know about certain widgeths or whatever that need a thinner scrollbar <bmathwig> +1 on this Florian <fantasai> florian: and that would be a reason for author control <emilio> +1 <fantasai> florian: so I think should stay not inherited <fantasai> +1 <tantek> also I disagree with the methodology of equating reasoning of -color with -width <fantasai> RESOLVED: Close WONTFIX; scrollbar-width remains non-inherited <TabAtkins> ScribeNick: TabAtkins |
scrollbar-color is inherited, yet scrollbar-width is not. (These are currently the only two properties in the scrollbars spec.) Is there any reason why these two related properties differ in inheritance?
The lack of inheritance is inconvenient for web devs wishing to ensure consistency in appearance site-wide, necessitating either excessive specific CSS selectors or the dreaded
*
.The text was updated successfully, but these errors were encountered: