Re: [csswg-drafts] [css sizing] auto <length> description may have wrong "otherwise" (#7769)

> The user scrolls the element near to the view so the user agent starts rendering the elements. At this point it starts using the length

In that case the element will no longer skip its contents, and thus won't have size containment (unless you are also using e.g. `contain: size`). So the element will use the actual intrinsic size from the contents instead of `contain-intrinsic-size`.

> Wont there potentially be some kind of visual effects due to the switch over?

Possibly, if e.g. the contents have changed (i.e. the last remembered size was outdated). But in most cases it should work well enough.

> Why ever both user using `auto`?

To mitigate these visual effects, like the scrollbar thumb jumping around, see #5668. Switching from an old non-contained size to the current non-contained size is probably better than switching from some poorly guessed length.

And note you can pair `contain-intrinsic-size: auto` with `content-visibility: hidden`, which will use the last remembered size even if the element is relevant to the user.



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


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

Received on Wednesday, 21 September 2022 17:21:20 UTC