@@ -145,8 +145,43 @@ For readability they have not been repeated explicitly.
145145Like most operations in CSS besides selector matching,
146146features in this specification operate over the [=flattened element tree=] .
147147
148- Determining the Anchor {#determining}
149- ======================
148+ <h2 id="determining" oldids="determining-position,anchor-position-size">
149+ Determining the Anchor</h2>
150+
151+ Several features of this specification refer to the position and size of an <dfn local-lt=anchor>anchor box</dfn> .
152+ Unless otherwise specified,
153+ this refers to the [=border box=] edge of the [=principal box=] of relevant [=anchor element=] .
154+ In most cases the relevant [=anchor element=] is specified
155+ as the [=default anchor element=] using the 'position-anchor' property,
156+ which can refer to an [=implicit anchor element=] defined by the host language
157+ or an anchor named via the CSS 'anchor-name' and 'anchor-scope' properties.
158+ (The ''anchor()'' functions can also reference a named anchor directly.)
159+
160+ The [=anchor box=] 's position and size is determined after layout.
161+ This position and size includes 'zoom' and 'position' -based adjustments
162+ (such as ''position: relative'' or ''position: sticky'' )
163+ as well as transforms (such as 'transform' or 'offset-path' ).
164+ In these cases, the axis-aligned bounding rectangle of the [=anchor box=]
165+ in the coordinate space of the [=absolutely positioned=] element's [=containing block=]
166+ is used instead.
167+ Transforms are often optimized onto a different thread,
168+ so transform-based updates to an [=anchor box’s=] position
169+ may be delayed by a few frames.
170+ Authors can avoid this delay by using absolute or relative positioning instead where practical.
171+
172+ If the [=anchor box=] is [=fragmented=] ,
173+ and the [=containing block=] of the [=absolutely positioned=] box
174+ referring to that [=anchor box=] is outside the relevant [=fragmentation context=] ,
175+ the axis-aligned bounding rectangle of its [=box fragments=] is used instead.
176+ (If the [=absolutely positioned=] box is inside the [=fragmentation context=] ,
177+ it sees the [=anchor box=] as unfragmented--
178+ and can be itself fragmented by the [=fragmentation context=] .)
179+
180+ For performance reasons,
181+ scrolling is handled specially, see [[#scroll]] .
182+ Other post-layout effects, such as filters,
183+ do not affect the [=anchor box's=] position.
184+
150185
151186<!-- Big Text: a-name
152187
@@ -217,57 +252,6 @@ can reference [=anchor names=] defined in “higher” trees.
217252Currently, they cannot reference [=anchor names=]
218253defined in “lower” shadow trees, though.
219254
220- ### Implicit Anchor Elements ### {#implicit}
221-
222- Some specifications can define that,
223- in certain circumstances,
224- a particular element is an <dfn>implicit anchor element</dfn>
225- for another element.
226-
227- <p class=example>
228- TODO: Fill in an example new popover-related details
229- (once that finally lands in the HTML spec).
230-
231- [=Implicit anchor elements=] can be referenced
232- with the ''position-anchor/auto'' keyword in 'position-anchor' ,
233- or by omitting the anchor reference in [=anchor functions=] .
234-
235- The [=implicit anchor element=] of a [=pseudo-element=]
236- is its [=originating element=] ,
237- unless otherwise specified.
238-
239- ### The Anchor Box ### {#anchor-position-size}
240-
241- Several features of this specification refer to the position and size of an <dfn local-lt=anchor>anchor box</dfn> .
242- Unless otherwise specified,
243- this refers to the [=border box=] edge of the [=principal box=] of the [=anchor element=] .
244- The [=anchor box=] 's position and size is determined after layout.
245-
246- This position and size includes 'zoom' and 'position' -based adjustments
247- (such as ''position: relative'' or ''position: sticky'' )
248- as well as transforms (such as 'transform' or 'offset-path' ).
249- In these cases, the axis-aligned bounding rectangle of the [=anchor box=]
250- in the coordinate space of the [=absolutely positioned=] element's [=containing block=]
251- is used instead.
252- Transforms are often optimized onto a different thread,
253- so transform-based updates to an [=anchor box’s=] position
254- may be delayed by a few frames.
255- Authors can avoid this delay by using absolute or relative positioning instead where practical.
256-
257- If the [=anchor box=] is [=fragmented=] ,
258- and the [=containing block=] of the [=absolutely positioned=] box
259- referring to that [=anchor box=] is outside the relevant [=fragmentation context=] ,
260- the axis-aligned bounding rectangle of its [=box fragments=] is used instead.
261- (If the [=absolutely positioned=] box is inside the [=fragmentation context=] ,
262- it sees the [=anchor box=] as unfragmented--
263- and can be itself fragmented by the [=fragmentation context=] .)
264-
265- For performance reasons,
266- scrolling is handled specially, see [[#scroll]] .
267- Other post-layout effects, such as filters,
268- do not affect the [=anchor box's=] position.
269-
270-
271255<!-- Big Text: a-scope
272256
273257 ███▌ ███▌ ███▌ ███▌ ████▌ █████▌
@@ -559,6 +543,25 @@ is the box's <dfn>default anchor box</dfn>.
559543 </pre>
560544</div>
561545
546+ ### Implicit Anchor Elements ### {#implicit}
547+
548+ Some specifications can define that,
549+ in certain circumstances,
550+ a particular element is an <dfn>implicit anchor element</dfn>
551+ for another element.
552+
553+ <p class=example>
554+ TODO: Fill in an example new popover-related details
555+ (once that finally lands in the HTML spec).
556+
557+ [=Implicit anchor elements=] can be referenced
558+ with the ''position-anchor/auto'' keyword in 'position-anchor' ,
559+ or by omitting the anchor reference in [=anchor functions=] .
560+
561+ The [=implicit anchor element=] of a [=pseudo-element=]
562+ is its [=originating element=] ,
563+ unless otherwise specified.
564+
562565<h3 id=anchor-relevance>
563566Anchor Relevance</h3>
564567
@@ -2675,8 +2678,9 @@ Significant changes since the <a href="https://www.w3.org/TR/2025/WD-css-anchor-
26752678 (<a href="https://github.com/w3c/csswg-drafts/issues/12941">Issue 12941</a> )
26762679* Clarify that ''inset/auto'' 'inset' values are treated as zero when finding the [=inset-modified containing block=] size for 'position-try-order' .
26772680 (<a href="https://github.com/w3c/csswg-drafts/issues/12942">Issue 12942</a> )
2678- * Reorganize prose in [[#fallback]] for better readability.
2679- (<a href="https://github.com/w3c/csswg-drafts/issues/12811">Issue 12818</a> )
2681+ * Reorganize prose in [[#fallback]] and [[#determining]] for better readability.
2682+ (<a href="https://github.com/w3c/csswg-drafts/issues/12811">Issue 12818</a> ,
2683+ <a href="https://github.com/w3c/csswg-drafts/issues/12811">Issue 11022</a> )
26802684* Improve guidance in [[#accessibility]] and clarify UA requirements.
26812685 (<a href="https://github.com/w3c/csswg-drafts/issues/10311">Issue 10311</a> )
26822686* Improve examples.
0 commit comments