Re: [csswg-drafts] [css-contain] Style containment for counters (#9212)

Also, these two tests need spec clarification:

https://github.com/web-platform-tests/wpt/blob/master/css/css-contain/contain-style-counters-004.html
and
https://github.com/web-platform-tests/wpt/blob/master/css/css-contain/contain-style-counters-005.html

for the 004 the question is - why we don't have 13 as the result, as it doesn't seem different from the spec example: https://drafts.csswg.org/css-contain-2/#example-6932a400. (btw, removing <span>s will produce 13 in Firefox, but they should not change the result, since we still can leave the style containment scope, even the <span>s are there? Or it has to do something with the first counter-increment acting like it was set to 0 on scope element?).

for the 005 the question is - since we have counters(), shouldn't it access counters established outside the style containment scope? E.g. the first div with class increment will create a counter, that is inherited by the first div with class contain. Inside this style containment div the first div with class increment will create another counter. So, when later using counters() on ::before of that div, shouldn't counters also leave the style containment scope and produce 11 as a result? Basically, it's the same as the same example https://drafts.csswg.org/css-contain-2/#example-6932a400?

-- 
GitHub Notification of comment by danielsakhapov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9212#issuecomment-1720840160 using your GitHub account


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

Received on Friday, 15 September 2023 07:55:31 UTC