Intent to Ship: auto keyword for contain-intrinsic-size

98 views
Skip to first unread message

Christian Biesinger

unread,
Oct 29, 2021, 3:19:58 PM10/29/21
to blink-dev
Contact emails

cbies...@chromium.org, vmp...@chromium.org

Explainer

https://gist.github.com/cbiesinger/f2378dbcd215495c3a1daf9696a8e91f

Specification

https://drafts.csswg.org/css-sizing-4/#last-remembered

Summary

Support for the "auto" keyword in contain-intrinsic-size lets web
sites use the last remembered size of an element (if any), which
providers for a better user experience as elements have size
containment turned on and off, e.g. through content-visibility: auto.



Blink component

Blink>Layout

Search tags

contain-intrinsic-size, contain intrinsic size, auto

TAG review

https://github.com/w3ctag/design-reviews/issues/624

TAG review status

Pending

Risks



Interoperability and Compatibility

No compat risk; all existing CSS will continue to work unchanged.
Interop risk: if web developers only use the new syntax, then content
will be sized as 0x0. They can use the usual CSS fallback syntax to
avoid this, like: contain-intrinsic-size: 100px 100px;
contain-intrinsic-size: auto 100px auto 100px;



Gecko: No signal
(https://github.com/mozilla/standards-positions/issues/512) dholbert
wrote in the standards position issue that "In general the feature
seems reasonable"

WebKit: No signal
(https://lists.webkit.org/pipermail/webkit-dev/2021-April/031787.html)

Web developers: Positive (https://github.com/w3c/csswg-drafts/issues/5815)

Ergonomics

Possible risk is that this requires using resize observer internally
to get the last rendered size. We think this will not be an issue in
practice.



Activation

Very easy; easier than the existing contain-intrinsic-size (which is the point)



Security

n/a



Debuggability

Same as any other CSS property.



Is this feature fully tested by web-platform-tests?

No

Flag name



Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1199460

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6740477866934272

Links to previous Intent discussions

Intent to prototype:
https://groups.google.com/a/chromium.org/g/blink-dev/c/loqGn7N9hzU/m/mRDdLA_cAgAJ


This intent message was generated by Chrome Platform Status.

Manuel Rego Casasnovas

unread,
Nov 4, 2021, 3:27:36 PM11/4/21
to Christian Biesinger, blink-dev
LGTM1 but please add WPT tests.

On 29/10/2021 21:19, 'Christian Biesinger' via blink-dev wrote:
> Is this feature fully tested by web-platform-tests?
>
> No

I guess this is a mistake and you're actually adding WPT tests as part
of this.

Cheers,
Rego

Yoav Weiss

unread,
Nov 10, 2021, 1:58:54 PM11/10/21
to blink-dev, Christian Biesinger
I also see that dholbert@ raised concerns. Were they addressed?

Christian Biesinger

unread,
Nov 10, 2021, 2:03:57 PM11/10/21
to Yoav Weiss, blink-dev
Yes, dholbert's concerns should be addressed by relying on resize
observer timing, which the spec now uses. I'll ping him to comment in
the issue.

With regards to WPT tests, I will of course write them, I thought I
had a note to that effect in chromestatus; it must have gotten lost
somewhere.

Thanks,
Christian

Yoav Weiss

unread,
Nov 10, 2021, 2:13:16 PM11/10/21
to Christian Biesinger, blink-dev
Sounds good! LGTM2

Daniel Bratell

unread,
Nov 10, 2021, 3:40:47 PM11/10/21
to blink-dev, yoav...@chromium.org, blink-dev, Christian Biesinger
LGTM3

/Daniel

Reply all
Reply to author
Forward
0 new messages