Re: [csswg-drafts] [css-view-transitions-1] Fix tree-scoping from element-based to name-based. (#10528)

Not sure the spec change is worded quite right, if you have:

```
<style>
::part(party) {
  view-transition-name: document-scoped;
}
</style>
#shadow-root
    <style>
      div {
        width: 100px;
        height: 100px;
        view-transition-name: shadow-scoped !important;
      }
    </style>
    <div part="party"></div>
```

I expect the effective view transition name of the `<div>` to be `shadow-scoped`, and `document-scoped` being ignored. 

Since `shadow-scoped` is scoped to the shadow root and `document-scoped` ignored, the `<div>` wouldn't participate in the view transition.

The spec change suggests otherwise, although I think the Chromium change is correct.

Anyway it would be good to add coverage for that case + capturing ::before/::backdrop pseudo-elements (where we should use the originating element's scope) in those situations as well.

-- 
GitHub Notification of comment by nt1m
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/10528#issuecomment-2209618603 using your GitHub account


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

Received on Thursday, 4 July 2024 22:41:44 UTC