Skip to content

Commit a4f08e4

Browse files
committed
[css-anchor-1] Second attempt at fixing 'acceptable anchor element' rules #12830
1 parent 090b034 commit a4f08e4

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

css-anchor-position-1/Overview.bs

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

426426
* |possible anchor| is laid out strictly before |positioned el|,
427427
aka one of the following is true:
428-
* Both |positioned el| and |possible anchor| are [=absolutely positioned=],
429-
and |positioned el|'s [=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 [=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 [=containing block=].
428+
* |possible anchor| and |positioned el| share a [=containing block=]
429+
and either
430+
* |possible anchor| is [=in a lower top layer=] than |positioned el|, or
431+
* they both exist in the same [=top layer=],
432+
but |possible anchor| is either not [=absolutely positioned=]
433+
or occurs earlier in the [=flat tree=] order than |positioned el|
434+
* The element generating |possible anchor|'s [=containing block=]
435+
(if one exists)
436+
is an [=acceptable anchor element=] for |positioned el|
437+
438+
Issue: “Share a containing block” isn't strictly correct;
439+
for example, two [=absolutely positioned boxes=]
440+
contained by the same [=grid container=] but with different 'grid-area' values
441+
get different [=containing blocks=],
442+
but should treat them as equivalent for this case.
443+
On the other hand, a scroller's [=fixed containing block=]
444+
and that same scroller's [=local containing block=]
445+
are using different [=containing blocks=] for this purpose
446+
(for example the [=initial fixed containing block=] contains the [=initial containing block=]).
447+
Need a better notion of “equivalent” [=containing blocks=] here.
446448

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

0 commit comments

Comments
 (0)