Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions css-position-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ Top Layer Manipulation {#top-manip}

<div algorithm>
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>,
given an {{Element}} |el|:
given an {{Element}} |el| and an optional ist of steps |afterRemoval|:

1. Let |doc| be |el|'s [=Node/node document=].

Expand All @@ -327,12 +327,12 @@ Top Layer Manipulation {#top-manip}

3. Remove the UA !important ''overlay: auto'' rule targeting |el|.

4. [=set/Append=] |el| to |doc|'s [=pending top layer removals=].
4. [=set/Append=] (|el|, |afterRemoval|) to |doc|'s [=pending top layer removals=].
</div>

<div algorithm>
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>,
given an {{Element}} |el|:
given an {{Element}} |el| and an optional list of steps |afterRemoval|:

1. Let |doc| be |el|'s [=Node/node document=].

Expand All @@ -341,6 +341,8 @@ Top Layer Manipulation {#top-manip}
3. Remove the UA !important ''overlay: auto'' rule targeting |el|,
if it exists.

4. Run |afterRemoval|.

Note: This algorithm is only intended to be used in special cases
where removing something from the top layer immediately
(bypassing things like an 'overlay' transition)
Expand All @@ -353,10 +355,13 @@ Top Layer Manipulation {#top-manip}
To <dfn export>process top layer removals</dfn>,
given a {{Document}} |doc|:

1. For each element |el| in |doc|'s [=pending top layer removals=]:
if |el|&apos;s computed value of 'overlay' is ''none'',
or |el| is [=not rendered=],
[=remove from the top layer immediately=] |el|.
1. For each (element |el| and steps |afterRemoval|) in |doc|'s
[=pending top layer removals=]: if |el|&apos;s computed value of
'overlay' is ''none'', or |el| is [=not rendered=]:

1. [=remove from the top layer immediately=] |el|.

2. Run |afterRemoval|.

Note: This is intended to be called during the "Update the Rendering" step
of HTML's rendering algorithm.
Expand Down