[csswg-drafts] [css-view-transitions] Capture the old state is missing content-visibilty check. (#13831)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-view-transitions] Capture the old state is missing content-visibilty check. ==
https://drafts.csswg.org/css-view-transitions-2/#capture-the-old-state:~:text=If%20transitionName%20is%20none%2C%20or%20element%20is%20not%20rendered%2C%20then%20continue%2E

Is inconsistent with:

https://drafts.csswg.org/css-view-transitions-2/#update-pseudo-element-styles:~:text=capturedElement%E2%80%99s%20new%20element%20has%20a%20flat%20tree%20ancestor%20that%20skips%20its%20contents%2E

Firefox follows the spec to the letter, causing an uncaught exception on this test-case:

```html
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
details span {
  view-transition-name: hidden;
}
</style>
<button>Click me!</button>
<details><summary>Hiding</summary><span >Hidden</span></details>
<script>
document.querySelector("button").addEventListener('click',
    ()=>{document.startViewTransition()})
</script>
```

I believe "Capture the old state" should also check for `content-visibility`.

cc @vmpstr 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13831 using your GitHub account


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

Received on Tuesday, 21 April 2026 15:33:25 UTC