Skip to content

Commit

Permalink
[css-sizing-4] More #6308 - discussion with chrishtr concluded that a…
Browse files Browse the repository at this point in the history
…n on-screen c-v:hidden element using a phantom size would also still be bad.
  • Loading branch information
tabatkins committed Dec 2, 2021
1 parent 6eb6faa commit 839ae05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion css-sizing-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,15 @@ Overriding Contained Intrinsic Sizes: the 'contain-intrinsic-*' properties</h3>

: <dfn>auto <<length>></dfn>
:: If the element has a [=last remembered size=],
and is currently [=skipping its contents=],
is currently [=skipping its contents=],
and is not [=relevant to the user=],
its [=explicit intrinsic inner size=]
is the [=last remembered size=].

Note: This occurs, for example,
when an element with ''content-visibility: auto''
is off-screen.

Otherwise,
its [=explicit intrinsic inner size=]
is the specified <<length>>.
Expand Down

2 comments on commit 839ae05

@chrishtr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chrishtr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On reflection, I don't think this commit is quite right. As written, it would say you should apply contain-intrinsic-size: auto to content-visibility:hidden elements that are scrolled offscreen. However, doing so would be unnecessarily expensive, because it would require an IntersectionObserver for all such elements. How about

"is currently [=skipping its contents=], is not [=relevant to the user=], and is only not relevant to the user because it is not on-screen"

?

Please sign in to comment.