@@ -20,6 +20,24 @@ spec:css-position-3;
20
20
type:property; text:inset-inline-start
21
21
</pre>
22
22
23
+ <style>
24
+ /* Put nice boxes around each algorithm. */
25
+ [data-algorithm] :not(.heading) {
26
+ padding: .5em;
27
+ border: thin solid #ddd; border-radius: .5em;
28
+ margin: .5em calc(-0.5em - 1px);
29
+ }
30
+ [data-algorithm] :not(.heading) > :first-child {
31
+ margin-top: 0;
32
+ }
33
+ [data-algorithm] :not(.heading) > :last-child {
34
+ margin-bottom: 0;
35
+ }
36
+ [data-algorithm] [data-algorithm] {
37
+ margin: 1em 0;
38
+ }
39
+ </style>
40
+
23
41
Introduction {#intro}
24
42
=====================
25
43
@@ -442,21 +460,40 @@ might not be capable of anchoring the positioned element.
442
460
but the details of that will depend on the API assigning them.)
443
461
</div>
444
462
445
- <div algorithm>
463
+ <div algorithm="acceptable anchor element" >
446
464
An element |el| is a <dfn export>acceptable anchor element</dfn>
447
465
for an [=absolutely positioned=] element |query el|
448
- if all of the following properties apply:
466
+ if any of the following are true:
467
+
468
+ * |query el| is in a higher [=root layer=] than |el|.
469
+
470
+ * |query el| and |el| are in the same [=root layer=] ,
471
+ and all of the following are true:
472
+
473
+ * Either |el| is a descendant of |query el|'s [=containing block=] ,
474
+ or |query el|'s [=containing block=] is the [=initial containing block=] .
475
+
476
+ * If |el| has the same [=containing block=] as |query el|,
477
+ |el| is not [=absolutely positioned=] .
449
478
450
- * Either |el| is a descendant of |query el|'s [=containing block=] ,
451
- or |query el|'s [=containing block=] is the [=initial containing block=] .
479
+ * If |el| has a different [=containing block=] from |query el|,
480
+ the last [=containing block=] in |el|'s [=containing block chain=]
481
+ before reaching |query el|'s [=containing block=]
482
+ is not [=absolutely positioned=] .
452
483
453
- * If |el| has the same [=containing block=] as |query el|,
454
- |el| is not [=absolutely positioned=] .
484
+ For the purposes of this algorithm,
485
+ an element is in a particular <dfn noexport>root layer</dfn>
486
+ corresponding to the closest [=inclusive ancestor=]
487
+ that is in the [=top layer=] ,
488
+ or the document if there isn't one.
489
+ [=Root layers=] are "higher" if their corresponding element
490
+ is later in the [=top layer=] list;
491
+ the layer corresponding to the document is lower than all other layers.
455
492
456
- * If |el| has a different [=containing block=] from |query el|,
457
- the last [=containing block=] in |el|'s [=containing block chain=]
458
- before reaching |query el|'s [=containing block=]
459
- is not [=absolutely positioned= ] .
493
+ Note: This wording around "root layer"
494
+ needs to live in a stacking-context spec,
495
+ after pulling the [=top layer=] stuff
496
+ out of [[fullscreen] ] .
460
497
</div>
461
498
462
499
An element can also have an <dfn export>implicit anchor element</dfn> ,
0 commit comments