Re: [csswg-drafts] [css-sizing] intrinsic-size lost the thread :( (#4531)

> * previously authors could set the "default size" property on all async-layout elements, and it would only trigger when needed

This was possible with CSS by using an attribute selector such as:

```
[rendersubtree*="invisible"] {
  intrinsic-size: 300px 400px
}
```

As Tab mentioned, in the past few weeks we have prototyped a [CSS implementation of rendersubtree](https://github.com/WICG/display-locking/issues/97), in response to partner feedback and some feedback from the previous F2F that this would be more ergonomic for developers.

But if `rendersubtree` is in CSS, you can't observe it via CSS or else there would be a circularity of CSS depending on CSS.

Due to the UA activation/async-rendering feature of `rendersubtree`, the value may change outside of developer control, and therefore we need a way to have placeholder sizing constraints apply only when the content is invisible; this is where the restriction to `contain:size` came from, since `contain:size` detaches subtree layout constraints from affecting outer layout.

Here are two ideas:

1. Augment containment syntax, via something like: `contain: size 300px 400px`
2. Choose a new name, such as: `contain-size-sizing: 300px 400px` (I didn't give this much thought, maybe there is a good name?)



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

Received on Friday, 22 November 2019 23:57:19 UTC