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

I was a little confused about the end of the discussion (and @dbaron's proposal), specifically:
> …If you were using the counters() function, and you incremented both outside and inside the subtree, the difference is that one would give you 3.1 and the other would give you 4

I tried with
```
<style>
div::before {
  counter-increment: foo;
  content: counters(foo, ".");
}
</style>

<div>
  <div style="contain: style"> 
    <div></div>
    <div></div>
  </div>
  <div> 
    <div></div>
    <div></div>
  </div>
</div>
```

And I see, on Chrome and Firefox:
```
1
1
2
3
2
3
4
```

That's what I'd expect. But it seemed like the discussion was about this being something like 1.1 1.2 inside the style containment, or did I misunderstand?

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


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

Received on Wednesday, 27 September 2023 17:15:42 UTC