[csswg-drafts] [css-contain] unclear about counter() in 'contain: style' context (#9116)

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

== [css-contain] unclear about counter() in 'contain: style' context ==
I'm confused a bit about the behavior of content: counter() in the context of 'contain: style'.

The spec [says](https://drafts.csswg.org/css-contain/#example-6932a400):

`However, the counter() and counters() value of the content property is not itself scoped, and can refer to counters established outside of the subtree.`

My interpretation is that we can leave the style containment scope for search of the counter value.
And the example after the text above shows the same.

But the [test](https://wpt.fyi/results/css/css-contain/contain-style-counters-004.html), which all the browsers pass tells the other story, it doesn't allow the access to the reset on body element.

So, my question - is my understanding incorrect? If so, why we can access the 1 for div::before in example, doesn't it cross the style containment boundary?

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


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

Received on Tuesday, 25 July 2023 13:49:41 UTC