Skip to content

Commit a1e53bb

Browse files
committed
[css-anchor-position] Move/rephrase the explanatory note a little to make it more obvious.
1 parent de3cd9b commit a1e53bb

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

css-anchor-position-1/Overview.bs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,20 @@ that should match an 'anchor-name' value elsewhere on the page,
297297
or the keyword ''implicit'',
298298
or nothing (a missing specifier).
299299

300+
Note: The general rule captured by these conditions
301+
is that an element can only be an anchor
302+
if it's fully laid out
303+
before the positioned element that wants to reference it
304+
is laid out.
305+
CSS's layout rules provide some useful guarantees about this,
306+
depending on the anchor and positioned element's relationship
307+
with each other and their containing blocks.
308+
The list of conditions below
309+
exactly rephrases the stacking context rules
310+
into just what's relevant for this purpose,
311+
ensuring there is no possibly circularity
312+
in anchor positioning.
313+
300314
<div algorithm>
301315
To determine the <dfn>target [=anchor element=]</dfn>
302316
given a querying element |query el|
@@ -339,17 +353,6 @@ or nothing (a missing specifier).
339353
which can affect what elements can be [=anchor elements=]
340354
for a given lookup.
341355

342-
Note: The general rule captured by these conditions
343-
is that |el| must be fully laid out
344-
before |query el| is laid out.
345-
CSS's rules about the layout order of stacking contexts
346-
give us assurances about this,
347-
and the list of conditions above
348-
exactly rephrases the stacking context rules
349-
into just what's relevant for this purpose,
350-
ensuring there is no possibly circularity
351-
in anchor positioning.
352-
353356
Note: An 'anchor-name' defined by styles in one [=shadow tree=]
354357
won't be seen by [=anchor functions=] in styles in a different [=shadow tree=],
355358
preserving encapsulation.

0 commit comments

Comments
 (0)