Re: [csswg-drafts] [css-scoping-1] Dynamic changes of state and attributes referenced by :host-context rules are pretty hard to handle efficiently. (#1914)

> If the host and the elements in nested trees are coordinated (as in both the "chart" and the "subheading" use cases) the outer component can definitely pass the relevant information to the inner components, right? Or what am I missing?
> 
> For the first example in thread it would look like:
> 
> ```css
> --sub-heading-display: {inline, block};
> --sub-heading-margin: <something>;
> ```
> 
> On the heading elements, then `e-small` would use those variables for example.

These are not always about setting the same property to different values, but one may need to set entirely different properties. I suppose you could pass down values for the union of all properties that may need to be set, but it gets awkward fast, and if you have multiple interesecting variations you could get a combinatorial explosion.

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


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

Received on Tuesday, 19 October 2021 17:50:03 UTC