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

[css-scrollbars-1] Rename scrollbar-width to scrollbar-thickness #2966

Closed
Zhang-Junzhi opened this issue Jul 30, 2018 · 8 comments
Closed

[css-scrollbars-1] Rename scrollbar-width to scrollbar-thickness #2966

Zhang-Junzhi opened this issue Jul 30, 2018 · 8 comments

Comments

@Zhang-Junzhi
Copy link
Contributor

https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width

As a scrollbar width only sounds like the thickness of a vertical scrollbar. For a horizontal scrollbar, the meaning of width doesn't seem very clear, the bar thickness is more likely called height of a horizontal scrollbar.

Thickness is just a direction-neutual word. So what about renaming scrollbar-width to scrollbar-thickness?

@Zhang-Junzhi Zhang-Junzhi changed the title Rename scrollbar-width to scrollbar-thickness [css-scrollbars-1] Rename scrollbar-width to scrollbar-thickness Jul 30, 2018
@tabatkins
Copy link
Member

thickness is long and not used elsewhere in CSS.

While I don't think -width is particularly problematic (it's fairly clear what it refers to from context), is there a reason we're not just using -size?

@tabatkins tabatkins added the css-scrollbars-1 Current Work label Jul 30, 2018
@Zhang-Junzhi
Copy link
Contributor Author

I originally thought of size, but then I thought size also sounds like a scrollbar's inner size, in other words, sounds like the size in the scroll direction. Thickness seems less likely to mean that(this is just my personal sense on the two words. However, I am not a native speaker, ).

@Zhang-Junzhi
Copy link
Contributor Author

But I still prefer size to width.

width is no less ambiguous than size, since size is at least more direction-neutual.

@jonjohnjohnson
Copy link

Regarding the concern about terminology raised by https://github.com/silverwind about using "width" for horizontal scrollbars, vs the suggested alternative "thickness", note that CSS already has a notion of modifying the width of horizontal and vertical "bars" in the 'border-width' and 'outline-width' properties.

In particular note the pre-existing 'border-top-width' and 'border-bottom-width' properties (https://drafts.csswg.org/css-backgrounds-3/#border-width) which specifically apply to horizontal borders. Thus I think it is both ok and desirable to use "width" to refer to the scrollbar size as well, since it is consistent with those existing properties, and matches what web developers will likely already be familiar with in CSS.

@tantek #1958 (comment)

@Zhang-Junzhi
Copy link
Contributor Author

Zhang-Junzhi commented Jul 31, 2018

Thanks for the referencing the quote, @jonjohnjohnson .

There are also properties such as line-height, vertical-align, top(value), bottom(value), which were named due to the historical reason, those concepts were introduced before writing-mode was introduced, but similar properties and values that were introduced later didn't follow such historical convention(e.g. align-content, start, end), thus turned out for a new property or new value name to be not necessarily consistent with similar older ones.

Also, I personally don't have a strong opinion on using thickness, just perfer a direction-neutual word, if we are worried about naming convention, at least the word size is something that is commonly used in CSS.

@Zhang-Junzhi
Copy link
Contributor Author

And further, there's one other thing to be considered:

Maybe some day we may also eventually want to provide ability to control the length of a scrollbar's inner length(the one perpendicular to "width"), so at an early age, the room for naming of the future property may also be considered.

Had we already used -width, then later the name for a scrollbar's inner length would have to be accommodate itself to scrollbar-height. At the time we have both -width, -height, ambiguity would be increased for a horizontal scrollbar.

@fshafique
Copy link

Is there a reason why -length cannot be used as the other dimension?

I don't know any other CSS property that uses it, but it also sounds better than -height when used with horizontal scrollbars.

@frivoal
Copy link
Collaborator

frivoal commented Jul 9, 2021

In addition to the reasons discussed above, this is no longer practical to change, since it has been shipping for a while in Firefox with the scrollbar-width name.
Closing no change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants