Re: [WICG/webcomponents] Web components should be able to easily adapt to the host page while maintaining enapsulation (Issue #986)

> You don't want the page author to have to reach into their styling framework and add ::part(input) or ::part(button) for that.

The selector problem isn’t specific to custom elements, is it? A list of selectors including many pseudo-element selectors is needed for describing “all buttons” without any custom elements in play: `::-webkit-calendar-picker-indicator`, `::-webkit-file-upload-button`, `::file-selector-button`, `input[type=button]`, and `input[type=submit]` come to mind. I’d guess there are more than that, too?

I don’t think that’s ideal either, but I suspect a solution ought to address the problem generically rather than just for custom elements. I wonder if things would change here if native composite widgets all began exposing their buttons as `::part(button)`, say: generic style sheets would eventually end up “friendly” to custom elements with button parts because it could become a matter of following the native-established part naming conventions?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/986#issuecomment-1460508512
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/986/1460508512@github.com>

Received on Wednesday, 8 March 2023 17:03:36 UTC