-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ::backdrop stay in top layer while animating out
This patch adds a new internal pseudo class which matches popovers while they are still in the top layer after they have been closed in order to also make the corresponding ::backdrop stay in the top layer. This is based on futhark's patch: https://chromium-review.googlesource.com/c/chromium/src/+/4554016 HTML spec PR: whatwg/html#9387 Fixed: 1449145 Change-Id: I8e4831e960c5d18fb077f023c119fd0e678541df
- Loading branch information
1 parent
1678307
commit 7ba891f
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
css/css-position/overlay/overlay-transition-backdrop-entry.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
3<!DOCTYPE html> | ||
<title>CSS Position Test: overlay transition with ::backdrop during entry animation</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> | ||
<link rel="match" href="green-ref.html"> | ||
<style> | ||
body { | ||
background-color: green; | ||
} | ||
[popover] { | ||
display: block; | ||
visibility: hidden; | ||
transition-delay: 60s; | ||
transition-property: overlay; | ||
transition-duration: 60s; | ||
} | ||
[popover]::backdrop { | ||
background-color: blue; | ||
} | ||
</style> | ||
<div popover id="foo"></div> | ||
<script> | ||
foo.showPopover(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
3<!DOCTYPE html> | ||
<title>CSS Position Test: overlay transition with ::backdrop</title> | ||
<link rel="help" href="https://drafts.csswg.org/css-position-4/#overlay"> | ||
<link rel="match" href="green-ref.html"> | ||
<style> | ||
[popover] { | ||
display: block; | ||
visibility: hidden; | ||
transition: overlay 60s step-end; | ||
} | ||
[popover]::backdrop { | ||
background-color: green; | ||
} | ||
</style> | ||
<div popover id="foo"></div> | ||
<script> | ||
foo.showPopover(); | ||
foo.hidePopover(); | ||
</script> |