[csswg-drafts] [css-sizing-4] Support percentage lengths in contain-intrinsic-size (#5514)

chrishtr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-sizing-4] Support percentage lengths in contain-intrinsic-size ==
It would be useful to be able to specify containment sizing based on the width/height of the container. e.g.

`contain-intrinsic-size:100% 50%` would be to be 100% width and 50% height.

If we also add auto keywords we could support aspect-ratio:

`contain-intrinsic-size: 100% auto; aspect-ratio: 2/1`

This will allow subtrees that have `content-visibility: auto` to have an easier time with responsive design. Otherwise you might need approximations like:

`contain-intrinsic-size: min(var(--main-width), 600px) min(calc(var(--main-width) * 0.813333), 488px` (real example from a page using the property).

@cramforce @vmpstr @cbiesinger 


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5514 using your GitHub account


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

Received on Tuesday, 15 September 2020 17:50:31 UTC