You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No change to the spec needed necessarily, but I find it somewhat weird that:
my-element::part(foo) {
width: attr(bar px);
}
Looks at the bar attribute on the part, rather than on my-element, where there wouldn't be a way for the outer tree to set the attribute value in any other way. In fact it allows leaking attributes out of the shadow tree sometimes at least via inheritance (if foo contains a <slot>).
Was that intentional? Implementation wise is definitely easier not to care about where the rule came from tho.
Maybe a note in the spec would be nice noting this oddity.
It gets a bit funnier for element-backed pseudo-elements tho, where should the attribute be looked at for those?
Per spec to the originating element, which seems fine, but it's a bit weird to have this divergence with ::part().