Re: [csswg-drafts] [css-ui] Pseudo-element for select's UA button (#10717)

Thanks for the feedback!

I like the idea of setting a bunch of properties to `unset` to make them inherit from the shadow host `<select>`, that would make the `::select-fallback-button` usage as shown in the explainer unneeded.

> Maybe consider making the fallback button full size, but "invisible" (deferring all of its styling to the parent select):

The way I've been designing this so far is to try to make the `<select>`'s box "invisible" rather than the fallback or author buttons invisible, mostly by removing borders from the `<select>` in appearance:base mode. This has been nice because its consistent between the cases of author provided or fallback buttons.

If we make the fallback button "invisible", then when the author provides their own button should we make that one "invisible" too? Or should we make the author apply more styles to make the `<select>`'s box "invisible"? For example, we could end up with the situation where by default both the `<select>` has a border and the author provided `<button>` has a border. I don't think this would ever be desirable, and ideally we wouldn't put the burden on the author to pick one of the borders and remove the other.

I'm also worried about the focus ring being rendered around the invisible fallback button inside the visible select, which would for example make the focus ring get rendered inside of the border and look wrong. I suppose that's something I could try adding a bunch of special casing for in the rendering of focus rings but I'd prefer not to try that.

Is there a way we could make the non-inherited properties that would affect the box of the `<select>` to all be delegated to the fallback `<button>` instead, like borders?

-- 
GitHub Notification of comment by josepharhar
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10717#issuecomment-2278742628 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 9 August 2024 20:53:44 UTC