-
Notifications
You must be signed in to change notification settings - Fork 719
[css-scrollbars][css-scrollbars-1] Should we also add scrollbar width control? #1958
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
Comments
As I've noted in the f2f, I'm concerned about having exact width control can yield to undesired rendering in different platforms. Windows and macOS and Ubuntu all seem to all have different width for scrollbar. I guess if we want width modification, we should do either max width or some ratio to the default size. |
@upsuper agreed with your concerns. We should collect specific use-cases that seem to need scrollbar width control, then design & constrain the feature accordingly. |
We also rely on scrollbar width modification at Webflow for our Designer. IIRC there may be a nuance with scrollbar width and container width or |
Note that a "width" terminology wouldn't work for horizontal scrollbars. Maybe "thickness" is a better fitting term, thought I'm not too happy with that name either. |
Not sure. As a non native english speaker, I'd rather keep |
There appears to be consensus at least in the current comments on this issue for adding a property to modify scrollbar size, with some additional preference for that to be treated as a maximum size, allowing implementations to show smaller scrollbars if it’s more appropriate. I have captured the use-cases mentioned here and to me in person on the wiki accordingly: <https://www.w3.org/wiki/Css-scrollbars#Web_App_small_scrolling_areas> 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. I’m going to specify a 'scrollbar-width' property that takes length units that sets the maximum width of any scrollbars on an element when they are shown. 'auto' will be used as the initial value that means just use the platform default scrollbar size. (Originally published at: http://tantek.com/2018/185/t1/) |
Define a new 'scrollbar-width' property to set the maximum thickness of element scrollbars if any / when shown, per issue #1958.
'scrollbar-width' added to the draft accordingly with a few details defined, and a few details in notes. Please review: <https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width> Comment if you find aspects we can improve. Thumbs-up this comment if everything looks good enough for a public working draft. (Originally published at: http://tantek.com/2018/185/t5/) |
|
The Working Group just discussed The full IRC log of that discussion |
As a prior art, Microsoft has -ms-overflow-style property to provide part of the functionality, specifically hiding scrollbar while keep scrollable. That property also allows making scrollbar overlay on Windows, which I'm not sure whether would fit usecases of thin scrollbar. |
I'm not convinced that WebKit would ever add support for a scrollbar width property. Our system-rendered scrollbars are not designed to be rendered at variable widths, and we don't think that allowing web pages to deviate from the system norms is useful. |
As expressed in the F2F minutes, there's quite a bit of sites that currently alter their scrollbar width, in particular to make them skinnier than the platform default. This includes most Google properties, for example. This is why one of the major themes of the discussion was at least making this keywords, with Full control over width may not be amenable here, but at least a smidge of control seems called for, given the current population of custom scrollbars. |
With This property as well as the three keyword values have been implemented in Firefox Nightly on all desktop platforms behind pref "layout.css.scrollbar-width.enabled". (It is also supported on Android but still has some bug to be tackled.) |
It seems you are mostly talking about variable widths, but not the Is webkit completely against even the responsible use of |
Apart form the technical stuff (I don't know if there might be complications for "
Considering all this (and with the still often misused " At last a question: is the WD going round in the WAI circles, and what do they think? |
Excuse me, I wrote "WD" (Working Draft) - that was a typo. Must be "ED" (Editor's Draft). |
@franckyK I don't think anyone is arguing for the use of This isn't a feature that has been requested for the motivation to remove scrollbars on a normal body scrolling website and make it harder for accessibility. This is a feature that is needed in place of many hacky css/js layout treatments that hide nuisance scrollbars, when the scrollbar, mostly as an ornament, is confusing a user. People hide scrollbars for good reasons. This feature is allowing that to be done cleanly, if the author decides it's good for the interface/user. Imagine the photos app on your phone, that surely animates/snaps as you swipe between individual photos, while maybe showing a sliver of the previous and next photos. Without |
@smfr To follow up on my previous question about your perspective on On macOS I see the finders quick look functionality showing a "thin" scrollbar. In iOS Safari I see facebook attempting to hide a scrollbar with Is this really a property webkit won't want to implement from the current spec? |
@jonjohnjohnson: Thank you for the quick response. Maybe I wasn't clear enough in my post above (English is not my native language). |
Reopen to make spec edits. |
removed length units from scrollbar-width per discussions in issue #1958, lack of implementer interest, and at least some implementer objection to length units.
@tantek has made the spec edit, we can close this issue again now :) |
This comment has been minimized.
This comment has been minimized.
@jabcreations please moderate your language if you want to contribute here. You can express your opinion without editorializing about the competence of others. |
@smfr Webkit system-rendered scrollbars may not be designed to be rendered at variable widths, but they are check |
so i ended up here from caniuse page claiming this probably might get removed. however i don't get that intention from the above discussion. will it really be removed? will there be an alternative? |
No, I don't think there's any discussion about removing it. |
then i guess that page needs to be updated, looking at the recent spec edit. i can sort of see what that idea may have come from |
There is a fixed set of control sizes, including "normal" and "small" variants. WebKit chooses to use the "small" variant on some controls, but this may vary between platforms. |
Should we also add scrollbar width control?
@tabatkins noted in the f2f that Google uses scrollbar width modification in Gmail and Google Docs.
The text was updated successfully, but these errors were encountered: