[csswg-drafts] [css-sizing-4] Allow specifying only one dimension for intrinsic sizing (#5432)

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

== [css-sizing-4] Allow specifying only one dimension for intrinsic sizing ==
We have a definition of [contain-intrinsic-size](https://drafts.csswg.org/css-sizing-4/#intrinsic) which specifies both width and height dimensions of the intrinsic size.

For a case of vertical scrolling, we found that it is a common desire to have the width of an element be as wide as the scroller and the height be dictated by contain-intrinsic-size. This is particularly useful with [content-visibility: auto](https://www.w3.org/TR/css-contain-2/#using-cv-auto) which puts in size containment when the elements scroll off screen.

We've been recommending things like `contain-intrinsic-size: 1px 400px;` where 400px is the desired height, but it's a bit awkward. It would be nicer and more ergonomic to be able to specify just the height of the intrinsic size.

Is it possible for us to make the contain-intrinsic-size a shorthand for contain-intrinsic-width and contain-intrinsic-height (and possibly block-size and inline-size?) with `auto | <length>` or something similar

That way, developers would have an option of specifying just one of the two dimensions

/cc @tabatkins @chrishtr 


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


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

Received on Friday, 14 August 2020 15:22:25 UTC