[csswg-drafts] [css-contain] Clarification: does content-visibility: hidden affect id references? (#13184)

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

== [css-contain] Clarification: does content-visibility: hidden affect id references? ==
In https://crbug.com/464210151 we got a bug that boils down to the following testcase:
```
<svg width="100" height="100" style="background: red;">
  <rect x="0" y="0" width="100" height="100" fill="url(#lingrad)" />
</svg>

<div style="content-visibility: hidden;">
  <svg width="100" height="100">
    <defs>
      <linearGradient id="lingrad" x1="0" y1="0" x2="0" y2="1">
        <stop stop-color="lime" offset="0%" />
        <stop stop-color="lime" offset="100%" />
      </linearGradient>
    </defs>
  </svg>
</div>
```
Firefox, Safari: green
Chromium: red

https://drafts.csswg.org/css-contain/#skips-its-contents is the relevant section of the spec, but I don't think the behavior of id references is clear.

@vmpstr 

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


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

Received on Thursday, 4 December 2025 00:04:49 UTC