Re: [csswg-drafts] [css-contain] contain: style does not seem useful. (#3280)

While counters are the primary use-case here, any further features we develop where one property defines a (global) name and another property references it will benefit similarly. 

`contain: style` isn't necessarily meant as a perf win, but as an understandability win when composing things, as you don't have to worry about colliding values. If you style-isolate your component, you can increment counters freely within it, safe in the knowledge that you won't accidentally increment a counter from the outside document, or even create a counter scope that'll be visible in siblings.

> Is just not true, since you need to compute the style of ancestors in order to inherit from them.

The text you quoted is *explicitly* talking about dirty-bit propagation, *not* a more generic "there's no style connection between the inside and outside". As far as I can tell, this objection is thus invalid? 

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

Received on Friday, 11 January 2019 21:40:01 UTC