Skip to content

Commit 3b93f24

Browse files
committed
[css-anchor-position] Redo the previous change, while also reversing the nonsensical breakage introduced in ab02227. #8059
1 parent 32d3a5b commit 3b93f24

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

css-anchor-position-1/Overview.bs

+17-6
Original file line numberDiff line numberDiff line change
@@ -1773,14 +1773,25 @@ even tho they depend on layout and [=used values=].
17731773

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

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

1779+
Let |cb rect| be the size and position of |el|'s [=inset-modified containing block=].
1780+
1781+
3. If |el| has a [=snapshotted scroll offset=]:
1782+
1783+
1. Set |el rect| to the result of shifting it
1784+
by the [=snapshotted scroll offset=].
1785+
1786+
2. Recalculate |el|'s [=inset-modified containing block=],
1787+
with any non-''top/auto'' [=inset property|inset=] values
1788+
shifted by the [=snapshotted scroll offset=].
1789+
Set |cb rect| to this result.
1790+
1791+
3. If |cb rect| was negative-size in either axis
1792+
and corrected into zero-size,
1793+
[=iteration/continue=].
1794+
17841795
4. If |el rect| is not fully contained within |cb rect|,
17851796
[=iteration/continue=].
17861797

0 commit comments

Comments
 (0)