-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(css): Add example of
::backdrop
(#2175)
* Backdrop & Marker * Removed :marker * Minor adjustments --------- Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
- Loading branch information
1 parent
9240bfd
commit 6355aad
Showing
6 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
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,8 @@ | ||
button { | ||
font-size: 1.2rem; | ||
padding: 5px 15px; | ||
} | ||
|
||
dialog::backdrop { | ||
background-color: salmon; | ||
} |
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,8 @@ | ||
<button id="showDialogBtn">Show a dialog</button> | ||
|
||
<dialog id="favDialog"> | ||
<form method="dialog"> | ||
<p>The background shown outside of this dialog is a backdrop.</p> | ||
<button id="confirmBtn">Close the dialog</button> | ||
</form> | ||
</dialog> |
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,4 @@ | ||
const showDialogBtn = document.getElementById('showDialogBtn'); | ||
const favDialog = document.getElementById('favDialog'); | ||
|
||
showDialogBtn.addEventListener('click', () => favDialog.showModal()); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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