Skip to content

Commit 924d513

Browse files
authored
[css-anchor-1] Allow anchoring to abspos anchors (w3c#8779)
1 parent 0ccfcb3 commit 924d513

1 file changed

Lines changed: 11 additions & 28 deletions

File tree

css-anchor-position-1/Overview.bs

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -611,37 +611,20 @@ might not be capable of anchoring the positioned element.
611611
<div algorithm="acceptable anchor element">
612612
An element |el| is a <dfn export>acceptable anchor element</dfn>
613613
for an [=absolutely positioned=] element |query el|
614-
if any of the following are true:
614+
if all of the following are true:
615615

616-
* |query el| is in a higher [=root layer=] than |el|.
616+
* Either |el| is a descendant of |query el|'s [=containing block=],
617+
or |query el|'s [=containing block=] is the [=initial containing block=].
617618

618-
* |query el| and |el| are in the same [=root layer=],
619-
and all of the following are true:
619+
* If |el| has the same [=containing block=] as |query el|,
620+
then either |el| is not [=absolutely positioned=],
621+
or |el| precedes |query el| in the tree order.
620622

621-
* Either |el| is a descendant of |query el|'s [=containing block=],
622-
or |query el|'s [=containing block=] is the [=initial containing block=].
623-
624-
* If |el| has the same [=containing block=] as |query el|,
625-
|el| is not [=absolutely positioned=].
626-
627-
* If |el| has a different [=containing block=] from |query el|,
628-
the last [=containing block=] in |el|'s [=containing block chain=]
629-
before reaching |query el|'s [=containing block=]
630-
is not [=absolutely positioned=].
631-
632-
For the purposes of this algorithm,
633-
an element is in a particular <dfn noexport>root layer</dfn>
634-
corresponding to the closest [=inclusive ancestor=]
635-
that is in the [=top layer=],
636-
or the document if there isn't one.
637-
[=Root layers=] are "higher" if their corresponding element
638-
is later in the [=top layer=] list;
639-
the layer corresponding to the document is lower than all other layers.
640-
641-
Note: This wording around "root layer"
642-
needs to live in a stacking-context spec,
643-
after pulling the [=top layer=] stuff
644-
out of [[fullscreen]].
623+
* If |el| has a different [=containing block=] from |query el|,
624+
then the last [=containing block=] in |el|'s [=containing block chain=]
625+
before reaching |query el|'s [=containing block=]
626+
is either not [=absolutely positioned=]
627+
or precedes |query el| in the tree order.
645628
</div>
646629

647630
An element can also have an <dfn export>implicit anchor element</dfn>,

0 commit comments

Comments
 (0)