Dear web designers and developers who write CSS,
Is there anything you wish you could do to style a `<button>` or `<input type=button>` that you cannot easily do today in CSS???
Dear web designers and developers who write CSS,
Is there anything you wish you could do to style a `<button>` or `<input type=button>` that you cannot easily do today in CSS???
@dutchcelt > Styling buttons with system colours
Which part of the button would you like to see colored?
@jensimmons Just the three button values: ButtonText, ButtonFace, and ButtonBorder.
I think ButtonFace is a touch dark and ButtonBorder too similar with canvas. I like the recent improvement with link and visited, so hopefully we can see improvement across all system colors.
For now I have to replace some of them with my own values.
@dutchcelt @jensimmons ooh yes let me know if you do this!
I find there are even inconsistencies between the desktop and mobile browsers of the same kind - desktop chrome/edge's system colours really are terrible in dark mode, but mobile they seem fine đ¤ˇ
Yea the ::file-selector-button pseudo element feels so awkward
@konnorrogers @westbrook @jensimmons It was interesting to see `::file-selector-button` as the only existing "part-like pseudo-element" (essentially "real" elements in every way except being a "real" element) besides `::before` and `::after`. It points to it being
an outlier for sure.
(`::details-content` coming soon as well as a part-like pseudo element)
https://drafts.csswg.org/css-pseudo-4/#part-like-pseudo-elements
@jensimmons This isn't specific to button elements, but it comes up most frequently with them: being able to set `outline` on only some sides. I'm hesitant for that to exist for accessibility reasons, but it would definitely be useful!
(Why not use border? Offset and the fact that outline doesn't change the rendered position of the element, both important.)
Also, others have already mentioned, but pseudo elements on inputs would be great!
@jensimmons Iâd still like better methods for reclaiming interactive area from border radii: https://cloudfour.com/thinks/jagged-little-pill-issues-with-rounded-buttons/
@jensimmons also partial borders are a pain to implement and require SVG, or a boatload of linear gradients.
honestly, I can't think about something I'd want to do and can't do with a button in recent browsers with CSS. Maybe a better integration of a "pressed" state would be nice, but it's also totally doable today with aria.
But there would be some things I can imagine of with Text Inputs đ Or even better: proper styling of Select/Option and datalist.
@jensimmons I know this is an old-ish post, but...
Along these lines, itâd be magical if <select> had a keyword that enabled filtering behaviour, so a person could click the <select> and start typing to filter the <options> to just those that contained what had been typed.
e.g. With this <select> on the Interop 2024 page, I could start typing âscrollâ and it would filter the <options> to just those containing âscrollâ.
(itâd be pretty cool if another keyword allowed a new value to be entered)