-
Notifications
You must be signed in to change notification settings - Fork 56
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: scrollbar-color, scrollbar-width #563
Comments
Lea and I looked at this in the TAG Virtual F2F breakout:
|
Hi, @kenchris, Thank you very much for your comments. I apologize that it has taken me a few days to address them. Point 1 is a reasonable request. It is important to know whether authors can be confident that those values will deliver similar outcomes across different systems. As far as I have seen, there isn't a good visual reference for the As for point 2, I have already opened an issue along similar lines: w3c/csswg-drafts#5651 My proposal would be that, when only one color is provided to Another advantage I see for the "tint" semantic is that it is more flexible in case the scrollbar has more (or fewer) visual elements than a track and thumb. Regarding point 3, as I understand it this functionality has been intentionally kept out of the specification because of lack of consensus, one reason being that on some operating systems the type of scrollbar (static or overlay) responds to a user preference. Nevertheless, there is recognition that in some cases authors have strong reasons to implement their own scrolling solution: for those cases, When authors would like to prevent changes in their layout as scrollbars appear and disappear, like in your YouTube example, a good solution could be the |
Hi there, we looked at this in the TAG breakout today Scrollbars are everywhere on the web and one of the things developers are struggling with when making applications feel native. We are sad to hear that there is lack of consensus but we would still like this to be pursued. Maybe as part of Open-UI? https://github.com/WICG/open-ui @gregwhitworth No one on the TAG breakout was aware of scrollbar-gutter (maybe it was discussed before, but no one seems to remember) but it feels like something that should be reviewed as part of this (cc @dbaron). That spec also doesn't list the use-cases behind
Same in this above case. Let's hear the use-cases and see what is the best approach to solve them, even if that is for people to brew their own scrolling solution. |
Thank you for your comments, @kenchris .
Regarding the CSS Scrollbars spec, as I understand it the intention was to provide a simple way to cover most of the customizations that authors are already doing, while avoiding the complexity of For example, in the case
In both cases, authors are already using different hacks to hide the default scrollbar so they can implement their own solution. There are some more materials regarding the use cases behind the spec (for example), I guess it would be a good idea to compile them and extent that section of the explainer in https://github.com/felipeerias/css-scrollbars-explainer |
Hi @felipeerias - thanks for that and sorry for our snafu regarding the |
Hi @felipeerias, I've recently joined the OpenUI initiative and my goal is to try and work a bit on how to bring a little more standardization to scroll UI. My first two goals are the following:
The first point should be fully covered by the The 2nd point is partially handled with Personally, I envision a future where OpenUI could define a small range of scroll-ui components. These could be a full scrollbar with buttons, a simple indicator, an arrow button (such as listed here: openui/open-ui#105), etc. As far as I can see the current suggested styles that are part of CSS Scrollbars don't clash with this in any way, so that's great. The only thing that might be worth considering is the naming of the I find it hard to judge if the naming issue is important or entering into bike-shedding territory, so I'm definitely very open to feedback on that point. The |
Alright, I'll try to give some initial feedback on the There are a few things I noticed which don't appear to have been covered in the explainer yet: positioning of nested elementsI noticed the explainer doesn't appear to define exactly how nested elements will be positioned inside a container with a For example: Say I have a container element with How would such a child element be positioned if the parent control has a I'm partial to aligning the child with the inner edge of the gutter. Mostly because one of the big reasons to have a However, I do think we should also give people an easy way to align such a child element with the inner edge of the container's border. Unfortunately this brings about the problem mentioned here: w3c/csswg-drafts#5232 (comment) I can think of two possible approaching to solving this:
background-clipI also noticed the explainer doesn't appear to define how the gutter should apply to the |
I just realized that if we're going to make it easier for devs to create their own custom scroll chrome (such as when setting scrollbar-width to 0), that might also need to be taken into consideration with I don't have any time left to think this through today, but I figure it's worth mentioning in case anyone has some great ideas about this already. |
I've had a night to sleep on this and I have some additional thoughts: There is a real need from developers to be able create their own custom scroll UI. This means we shouldn't make too any assumptions about the dimensions of scroll chrome. We can't expect the width of a custom vertical scrollbar and the height of a custom horizontal scrollbar to always be the same. If we consider different types of UI (such as a carousel for example) the requirements will potentially be very different from native scrollbars as well. With this in mind, I would propose that we treat the Just as we have a single Additionally, if devs are going to use We could keep the
This would eliminate a lot of the complexities that lead to the need for a scroll-gutter css unit as well. Devs can instead just use existing units to set the desired dimensions explicitly. Browsers could still implement their own default scrollbar width like they do now and that would be enough to maintain backwards compatibility. Finally, for the sake of simplicity I would like to suggest we drop |
Oops, I see I totally forgot to specify something very important. The defining property of a |
As we continue to review this proposal it appears @Rayraz is raising a number of good questions that could affect your overall design. @felipeerias I would encourage you to redirect the discussion back to the CSS issues to get broader community feedback. Please bring back any new learnings that might alter this design when ready. |
Thanks @atanassov for joining in. To be honest I was a bit worried I might've ground things to a hold by suggesting an extension to the box model. I'm very much in favor of reopening the discussion around CSS Scrollbars. In reviewing the whole thing again I just now realized there may be a far simpler approach which may not have been discussed yet. We could drop If we combine I also imagine it'll be a lot less work for browsers to implement compared to both @felipeerias's |
We took another look at this during this week's meetings, and we are happy with the direction this proposal is going, so we are going to go ahead and close this. If/when there are substantive changes, feel free to open another review request. |
@LeaVerou, when you say the TAG is happy with the direction this proposal is going, is there a preference for a particular direction? These are the 3 directions I'm aware of:
Progress on this issue has been slow the past 2 months and I'd like to speed things back up if possible. |
Hi @Rayraz, We are happy with the original proposal which we were asked to review, and @felipeerias successfully addressed the few concerns we had. You raised a few additional issues, and @atanassov directed you to post them in the CSS WG repo to get broader community feedback. The TAG design review is — as the name suggests — a review, and is not suitable for unstructured brainstorming and iterative design, which should happen in the venue a proposal is incubated in (in this case, the CSS WG repo). The TAG is a small group and we do not generally have the bandwidth to engage in such brainstorming. Also, the TAG design review is generally more high level, and not a substitute for the kind of deep review and iterative design that happens in the WG itself. Please raise these issues in the CSS WG repo, iterate on the proposal there, and open a new design review when there are substantial changes, then we could take another look. Does that make sense? |
Thanks @LeaVerou, that makes sense. I'm new to this so I'm still figuring out the correct procedures. I'll go and have a look in the CSS WG repo and see if I missed anything important. |
@kenchris See w3c/csswg-drafts#6090 wrt overlay scrollbar controls. Also I'm not sure why posting comments to the CSSWG here considered is a good idea, if Lea hadn't linked this issue from an existing CSSWG issue, it's unlikely the rest of us would see it. |
@fantasai, I was posting in the wrong place too. Mostly because as someone completely new to participating on CSS standards it is not obvious at all where I should be contributing. Or at least it was not obvious to me, not even after attempting to ask around in order to find out where to start. I didn't say anything about it when Lea pointed it out to me, mostly because I assumed it was an error on my part at the time and did not want to sound negative. However, since I'm apparently not the only one who's in the wrong place, maybe it's helpful I speak up? To be honest it has been demotivating to spend ~2 months wondering why I didn't receive feedback, questioning if my contributions might be sub-par only to find out everyone else had simply been racing along somewhere else for 2 months. I have not checked up on progress since May 1st, so I don't know if everyone is still running with the scrollbar-gutter proposal and all that. Personally, I find it wildly complicated and a completely unnecessary. I'd much rather see things headed in a direction where scroll-gutter is scrapped and a way to force overlay scrollbars gets implemented instead. The already existing padding box can double as a scroll-gutter provided the scrollbars can simply set to overlay in any browser/device (not just mobile ones). Meanwhile, fixed scrollbars can be keept around to keep the old-school way of doing things around for backwards compatibility. If you feel it may still make sense to throw that idea in the mix (if someone else hasn't already done so in the mean time), I can try and make an effort to share it in the correct place. Someone else would probably have to be willing to adopt it and run with it though, because I likely won't be able to spend significant time participating until late September. |
@Rayraz It may take time to parse, but here is a comprehensive discussion on why overlay scrollbars don't have much of a chance at implementation and why/how |
@jonjohnjohnson thanks for pointing it out. It's much appreciated. I'm curious what made scrollbar-gutter the least worst option, so I will definitely take a serious look at it at my earliest convenience. |
Hola TAG!
I'm requesting a TAG review of the CSS Scrollbars spec.
The CSS Scrollbars Module Level 1 allows authors to style scrollbars by specifying their color scheme and thickness though the properties
scrollbar-color
andscrollbar-width
.scrollbar-color
: [css-scrollbars][css-scrollbars-1] standardization of scrollbar color properties w3c/csswg-drafts#1955scrollbar-width
: [css-scrollbars][css-scrollbars-1] Should we also add scrollbar width control? w3c/csswg-drafts#1958Further details:
We'd prefer the TAG provide feedback as (please delete all but the desired option):
💬 leave review feedback as a comment in this issue and @-notify [github usernames]
The text was updated successfully, but these errors were encountered: