Skip to content

Commit

Permalink
[css-anchor-position] Fix the use of the scroll snapshot in determini…
Browse files Browse the repository at this point in the history
…ng fallback, and close the edge case of a 0-height abspos considered to be fitting in a negative-height CB. #8059
  • Loading branch information
tabatkins committed Apr 9, 2024
1 parent 4fa6eb4 commit 32d3a5b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions css-anchor-position-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1773,12 +1773,13 @@ even tho they depend on layout and [=used values=].

1. Let |adjusted styles| be the result of [=applying a position option=] |option| to |el|.

2. Let |el rect| be the size and position of |el|'s margin box,
when laid out with |adjusted styles|.
Let |cb rect| be the size and position of |el|'s [=inset-modified containing block=].
2. Let |cb rect| be the size and position of |el|'s [=inset-modified containing block=].
If |cb rect| had to be adjusted to ensure
it didn't have a negative size,
[=iteration/continue=].

3. If |el| has a [=snapshotted scroll offset=],
subtract it from the position of both |el rect| and |cb rect|.
3. Let |el rect| be the size and position of |el|'s margin box,
when laid out with |adjusted styles|.

4. If |el rect| is not fully contained within |cb rect|,
[=iteration/continue=].
Expand Down

0 comments on commit 32d3a5b

Please sign in to comment.