-
Notifications
You must be signed in to change notification settings - Fork 717
[css-shadow-parts-1] Naming of ::theme #1695
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
I would prefer to split - e.g. provide part and theme as separate attributes as described here |
And I've just done the split. I need to add some better wording to the spec about the difference between the two, tho. |
I had a similar reaction in w3ctag/design-reviews#230 (comment) ; I tend to think that But now I need to dig back in to understand what this "split" is. According to the spec they're still both selecting on the |
I think/home it will change to something like this
|
@jakearchibald I personally find Something like |
I have a related issue with the theme naming. Consider someone making a control that wants to act like a built-in control, and expose its parts as pseudo-elements, like e.g. the nonstandard If you add ::-webkit-progress-bar { background: red; } this will change all But if you did my-progress::part(bar) { background: red; } this would not change my-progress::theme(bar) { background: red; } It seems strange to me that we'd use the name I apologize if some of my logic is incorrect here (e.g., maybe |
You say "stopped unexpectedly at boundaries", I say "correctly encapsulated behavior". ^_^
It does indeed, because selector matching does. ::-webkit-progress-bar exists on a A The only exception to this is that the UA stylesheet exists simultaneously in all tree scopes, so it can target |
Ah, great, OK, I have many fewer concerns then! |
https://tabatkins.github.io/specs/css-shadow-parts/
As a spec reader & developer, I struggled to figure out the difference between
::part
and::theme
. From https://twitter.com/jaffathecake/status/893430709632806912, it turns out::theme
pierces additional shadow boundaries, whereas::part
pierces only one.Unless I'm alone, it might be better to reflect this difference in the naming. Eg
::part-deep()
.The text was updated successfully, but these errors were encountered: