diff --git a/css-sizing-4/Overview.bs b/css-sizing-4/Overview.bs index e9fb06dcab45..c204a36a4c49 100644 --- a/css-sizing-4/Overview.bs +++ b/css-sizing-4/Overview.bs @@ -540,7 +540,7 @@ Overriding Contained Intrinsic Sizes: the 'contain-intrinsic-*' properties : auto && <> :: The corresponding axis has an [=explicit intrinsic inner size=] of its [=last remembered size=]. - If a [=last remembered size=] does not yet exist, + If a [=last remembered size=] does not exist, instead use the specified <>. @@ -601,19 +601,28 @@ Last Remembered Size offering the performance benefits of [=size containment=] while probably sizing accurately to its contents. + Only elements capable of being {{ResizeObserver}} targets can have a [=last remembered size=]. +
The [=last remembered size=] of an element is determined by: - * At the time that ResizeObserver events are determined and delivered, - if an element has ''contain-intrinsic-size: auto'' + * At the time that {{ResizeObserver}} events are determined and delivered, + if an element has ''contain-intrinsic-size: auto'', + is capable of being a {{ResizeObserver}} target, but does not have [=size containment=], - record its current inner dimensions + record the current inner dimensions of its [=principal box=] as its [=last remembered size=]. - An element might not have a [=last remembered size=], - if it has never been rendered without [=size containment=]. - (In this case, it will instead use the fallback value - provided along with ''contain-intrinsic-size/auto''.) + * At the time that {{ResizeObserver}} events are determined and delivered, + if an element has a [=last remembered size=] + but does not have ''contain-intrinsic-size: auto'', + remove its [=last remembered size=]. + + Note: The [=last remembered size=] is state attached to the element, + not any particular box generated by the element. + So long as the element retains ''contain-intrinsic-size: auto'', + it will remember its [=last remembered size=] + even across changes such as going to/from ''display: none''.