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
Here's a tree scoping issue related to #10145 and #10529. This might be intended behavior, but I wanted to double-check, because it's pretty counterintuitive and might affect extensibility.
and then inside my-element's shadow DOM, I have this:
@customElement("my-element")exportclassMyElementextendsLitElement{render(){returnhtml`<divpart="foo"></div>`;}staticstyles=css` div { /* This causes the global view-transition-name to have no effect. */ view-transition-name: foo !important; } `;}
In Chrome (stable + Canary), the view-transition-name: foo !important; property inside MyElement causes the global view-transition-name: foo; property to stop having any effect. As a result, the div ends up with no view transition name at all.
Most likely this behavior is correct, and it's just how properties on parts must behave.
That said, I found it pretty counterintuitive, and it seems to me that it breaks encapsulation somewhat. I'm also worried that this behavior might cause extensibility issues down the line, if we want to be able to have the shadow DOM participate in view transitions in a future version of the spec. So I just wanted to raise this so the spec authors can double-check that this is the intended behavior.
The text was updated successfully, but these errors were encountered:
joliss
changed the title
[css-view-transitions] Tree scoping: Shadow DOM's view-transition-name property breaks parent's
[css-view-transitions] Tree scoping: Shadow DOM's view-transition-name property breaks global property
Nov 26, 2024
Here's a tree scoping issue related to #10145 and #10529. This might be intended behavior, but I wanted to double-check, because it's pretty counterintuitive and might affect extensibility.
Say I have this in my global stylesheet:
and then inside my-element's shadow DOM, I have this:
In Chrome (stable + Canary), the
view-transition-name: foo !important;
property insideMyElement
causes the globalview-transition-name: foo;
property to stop having any effect. As a result, the div ends up with no view transition name at all.Most likely this behavior is correct, and it's just how properties on parts must behave.
That said, I found it pretty counterintuitive, and it seems to me that it breaks encapsulation somewhat. I'm also worried that this behavior might cause extensibility issues down the line, if we want to be able to have the shadow DOM participate in view transitions in a future version of the spec. So I just wanted to raise this so the spec authors can double-check that this is the intended behavior.
The text was updated successfully, but these errors were encountered: