-
Notifications
You must be signed in to change notification settings - Fork 719
[css-forms-1] Rework default styles for slider-like controls #12267
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
We should make these controls look like real, working controls. Design Principle 2:
Right now, they are very hard to understand. They do not look like typical UI. |
I definitely agree we probably want border radius on the thumb both for range and for switch (as well as probably switch's track/container). As for whether the thumb is larger than the track or not for range I'm fairly agnostic but if it helps make them more identifiable than I'm in favour. |
We could easily design something simple, elegant, very easy to use, generic enough to blend into any website. To do so, we'll probably use Conversely, another design principle is:
This principle does make folks believe we should not use rounded corners and drop shadows, that it's better to leave things unstyled — even if they look raw. I'm hoping we can thread the needle, but this does raise a question: If we do use some CSS to give the default some good & useful styling, but that requires developers to override it to apply their own styles (removing a drop shadow for instance), is that putting too much of a burden on the developer??? Thoughts? |
I agree that "minimal" doesn't have to mean "literally the absolute minimum that makes it not broken"; there's room to do a little bit of styling so it's usable. We want to be careful, because every property we add is another thing authors have to deal with, but I think a border-radius and possibly a box-shadow is likely fine. It just needs to be things that are obvious to spot, and obvious what element and property to target to revert it. |
I don't think I agree about adding box-shadow, because it's the kind of thing that can become an annoyance to override. Many designs trends over the years have not used box-shadows, and it is the kind of thing that can become true again in the future, despite not being true today. For border-radius, the reason I think it's OK for some controls like sliders, is because not having it is probably more painful for authors than helpful, since they'll have to add it more often than remove it. That may be in part due to current design trends but I've rarely seen range inputs or switches that don't look rounded. |
Another thing about shadows is that they introduce a filter effect and thus push into a different class of performance characteristics. We might not want to default a "basic" set of controls into that. (This would of course not be a concern with a shadow whose blur radius is 0.) |
My instinct is that border-radius is okay, box shadow probably isn't but there's nothing concrete backing that. I guess they're harder to make nice in dark mode for example, so if it's something that might be problematic in a common usage then we shouldn't use it. I completely agree we should make the controls recognisable and usable without pushing a strong design opinion on users. |
I think we might want to do these changes:
I think this will make the base appearance styles for the slider easier to customize by default, since developers won't have to override the track to make it smaller, or set the border-radius of thumb.
cc @lukewarlow
The text was updated successfully, but these errors were encountered: