Skip to content

Commit 184472e

Browse files
committed
[css-anchor-position-1] Rewrite valid anchor rules into a less confusing form. w3c#11602
1 parent 02a25d1 commit 184472e

File tree

1 file changed

+18
-31
lines changed

1 file changed

+18
-31
lines changed

css-anchor-position-1/Overview.bs

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -425,37 +425,24 @@ in anchor positioning.
425425

426426
* |possible anchor| is laid out strictly before |positioned el|,
427427
aka one of the following is true:
428-
* |positioned el| is [=in a higher top layer=] than |possible anchor|
429-
* Both elements are [=in the same top layer=]
430-
but have different [=containing blocks=],
431-
and |positioned el|'s [=containing block=]
432-
is an ancestor of |possible anchor|'s [=containing block=]
433-
in the [=containing block chain=],
434-
aka one of the following:
435-
* |positioned el|'s [=containing block=] is the viewport,
436-
and |possible anchor|'s [=containing block=] isn't.
437-
* |positioned el|'s [=containing block=] is the [=initial containing block=],
438-
and |possible anchor|'s [=containing block=] is generated by an element,
439-
and the last [=containing block=] in |possible anchor|'s [=containing block chain=]
440-
before reaching the [=initial containing block=]
441-
is either not [=absolutely positioned=]
442-
or precedes |positioned el| in the tree order.
443-
* both elements' [=containing blocks=] are generated by elements,
444-
and |positioned el|'s containing block
445-
is an ancestor in the [=flat tree=]
446-
to that of |possible anchor|'s [=containing block=],
447-
and the last [=containing block=] in |possible anchor|'s [=containing block chain=]
448-
before reaching |positioned el|'s [=containing block=]
449-
is either not [=absolutely positioned=]
450-
or precedes |positioned el| in the tree order.
451-
* Both elements are [=in the same top layer=]
452-
and have the same [=containing block=],
453-
and are both [=absolutely positioned=],
454-
and |possible anchor| is earlier in [=flat tree=] order
455-
than |positioned el|.
456-
* Both elements are [=in the same top layer=]
457-
and have the same [=containing block=],
458-
but |possible anchor| isn't [=absolutely positioned=].
428+
* Both |positioned el| and |possible anchor| are [=absolutely positioned=],
429+
and |positioned el|'s [=absolute positioning containing block=] is
430+
an ancestor of |possible anchor|'s [=absolute positioning containing block=]
431+
in the [=containing block chain=].
432+
433+
Note: The viewport is the highest possible containing block,
434+
and an ancestor of all other containing blocks.
435+
The [=initial containing block=] is a child of the viewport,
436+
and an ancestor of all [=containing blocks=]
437+
generated by elements not in a [=top layer=].
438+
* Both |positioned el| and |possible anchor| are [=absolutely positioned=]
439+
and have the same [=absolute positioning containing block=],
440+
and either |positioned el| is [=in a higher top layer=] than |possible anchor|,
441+
or they're both in the same [=top layer=]
442+
and |positioned el| is later in [=flat tree=] order than |possible anchor|.
443+
* |possible anchor| is not [=absolutely positioned=],
444+
and its [=containing block=]
445+
is either the same as or a descendant of |positioned el|'s [=absolute positioning containing block=].
459446

460447
* If |possible anchor| is in the [=skipped contents=] of another element,
461448
then |positioned el| is in the [=skipped contents=] of that same element.

0 commit comments

Comments
 (0)