You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-position-4/Overview.bs
+20-27Lines changed: 20 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -468,13 +468,8 @@ Top Layer Manipulation {#top-manip}
468
468
469
469
<div algorithm>
470
470
An element |el| is <dfn export>in the top layer</dfn>
471
-
of an optional {{Document}} |doc|
472
-
if |el| is [=list/contained=] in |doc|'s [=Document/top layer=]
473
-
but <em>not</em>[=list/contained=] in |doc|'s [=pending top layer removals=].
474
-
475
-
If |doc| is not passed,
476
-
it's [=in the top layer=]
477
-
if it would be so for <em>any</em>{{Document}}.
471
+
if |el| is [=list/contained=] in its [=Node/node document's=][=Document/top layer=]
472
+
but <em>not</em>[=list/contained=] in its [=Node/node document's=][=pending top layer removals=].
478
473
479
474
Note: Specs should use this concept,
480
475
rather than [=rendered in the top layer=],
@@ -487,14 +482,9 @@ Top Layer Manipulation {#top-manip}
487
482
488
483
<div algorithm>
489
484
An element |el| is <dfn export lt="render in the top layer">rendered in the top layer</dfn>
490
-
of an optional {{Document}} |doc|
491
-
if |el| is [=list/contained=] in |doc|'s [=Document/top layer=],
485
+
if |el| is [=list/contained=] in its [=Node/node document's=][=Document/top layer=],
492
486
and |el| has ''overlay: auto''.
493
487
494
-
If |doc| is not passed,
495
-
it's [=rendered in the top layer=]
496
-
if it would be so for <em>any</em>{{Document}}.
497
-
498
488
Note: Specs should use this concept,
499
489
rather than [=in the top layer=],
500
490
when they are not manipulating the top layer itself,
@@ -507,45 +497,48 @@ Top Layer Manipulation {#top-manip}
507
497
508
498
<div algorithm>
509
499
To <dfn export lt="add an element to the top layer | add to the top layer">add an element to the top layer</dfn>,
510
-
given a {{Document}} |doc|
511
-
and an {{Element}} |el|:
500
+
given an {{Element}} |el|:
501
+
502
+
1. Let |doc| be |el|'s [=Node/node document=].
512
503
513
-
1. If |el| is already [=list/contained=] in |doc|'s [=Document/top layer=]:
504
+
2. If |el| is already [=list/contained=] in |doc|'s [=Document/top layer=]:
514
505
* Assert: |el| is also in |doc|'s [=pending top layer removals=].
515
506
(Otherwise, this is a spec error.)
516
507
* [=set/Remove=] |el| from both |doc|'s [=Document/top layer=]
517
508
and [=pending top layer removals=].
518
509
519
-
2. [=set/Append=] |el| to |doc|'s [=Document/top layer=].
510
+
3. [=set/Append=] |el| to |doc|'s [=Document/top layer=].
520
511
521
-
3. At the UA !important [=cascade origin=],
512
+
4. At the UA !important [=cascade origin=],
522
513
add a rule targeting |el|
523
514
containing an ''overlay: auto'' declaration.
524
515
</div>
525
516
526
517
<div algorithm>
527
518
To <dfn export lt="request an element to be removed from the top layer | request removal from the top layer">request an element to be removed from the top layer</dfn>,
528
-
given a {{Document}} |doc|
529
-
and an {{Element}} |el|:
519
+
given an {{Element}} |el|:
530
520
531
-
1. If |el| is not [=list/contained=] |doc|'s [=Document/top layer=],
521
+
1. Let |doc| be |el|'s [=Node/node document=].
522
+
523
+
2. If |el| is not [=list/contained=] |doc|'s [=Document/top layer=],
532
524
or |el| <em>is</em> already [=list/contained=]
533
525
in |doc|'s [=pending top layer removals=],
534
526
return.
535
527
536
-
2. Remove the UA !important ''overlay: auto'' rule targeting |el|.
528
+
3. Remove the UA !important ''overlay: auto'' rule targeting |el|.
537
529
538
-
3. [=set/Append=] |el| to |doc|'s [=pending top layer removals=].
530
+
4. [=set/Append=] |el| to |doc|'s [=pending top layer removals=].
539
531
</div>
540
532
541
533
<div algorithm>
542
534
To <dfn export lt="remove an element from the top layer immediately | remove from the top layer immediately">remove an element from the top layer immediately</dfn>,
543
-
given a {{Document}} |doc|
544
-
and an {{Element}} |el|:
535
+
given an {{Element}} |el|:
536
+
537
+
1. Let |doc| be |el|'s [=Node/node document=].
545
538
546
-
1. [=set/Remove=] |el| from |doc|'s [=Document/top layer=] and [=pending top layer removals=].
539
+
2. [=set/Remove=] |el| from |doc|'s [=Document/top layer=] and [=pending top layer removals=].
547
540
548
-
2. Remove the UA !important ''overlay: auto'' rule targeting |el|,
541
+
3. Remove the UA !important ''overlay: auto'' rule targeting |el|,
549
542
if it exists.
550
543
551
544
Note: This algorithm is only intended to be used in special cases
0 commit comments