-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a couple of reftests for the :open pseudo-class.
Differential Revision: https://phabricator.services.mozilla.com/D234331 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1936113 gecko-commit: 6d39e75391fa69f3acc997d45dbf5c56bfe4df77 gecko-reviewers: dshin
- Loading branch information
1 parent
85b330f
commit 8f3f629
Showing
5 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
css/selectors/selectors-4/details-open-pseudo-001-ref.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,17 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>reference for details:open pseudoclass</title> | ||
|
||
<style> | ||
details { | ||
color: green; | ||
margin-left: 5em; | ||
} | ||
</style> | ||
|
||
<p>The details element should be open, green, and indented:</p> | ||
|
||
<details open=true> | ||
<summary>Summary</summary> | ||
<p>Detailed content</p> | ||
</details> |
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,22 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>test for details:open pseudoclass</title> | ||
<link rel="match" href="details-open-pseudo-001-ref.html"> | ||
<link rel="help" href="https://drafts.csswg.org/selectors-4/#open-state"> | ||
|
||
<style> | ||
details { | ||
color: red; | ||
} | ||
:open { | ||
color: green; | ||
margin-left: 5em; | ||
} | ||
</style> | ||
|
||
<p>The details element should be open, green, and indented:</p> | ||
|
||
<details open=true> | ||
<summary>Summary</summary> | ||
<p>Detailed content</p> | ||
</details> |
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,32 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<meta charset="utf-8"> | ||
<title>test for details:open pseudoclass</title> | ||
<link rel="match" href="details-open-pseudo-001-ref.html"> | ||
<link rel="help" href="https://drafts.csswg.org/selectors-4/#open-state"> | ||
|
||
<style> | ||
details { | ||
color: blue; | ||
} | ||
:open { | ||
color: green; | ||
margin-left: 5em; | ||
} | ||
</style> | ||
|
||
<script> | ||
function run() { | ||
document.querySelector("details").open = true; | ||
document.documentElement.classList.remove("reftest-wait"); | ||
} | ||
</script> | ||
|
||
<body onload="run()"> | ||
|
||
<p>The details element should be open, green, and indented:</p> | ||
|
||
<details> | ||
<summary>Summary</summary> | ||
<p>Detailed content</p> | ||
</details> |
15 changes: 15 additions & 0 deletions
15
css/selectors/selectors-4/details-open-pseudo-003-ref.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,15 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>reference for details:open pseudoclass</title> | ||
|
||
<style> | ||
details { | ||
color: blue; | ||
} | ||
</style> | ||
|
||
<p>The details element should be closed and blue:</p> | ||
|
||
<details> | ||
<summary>Summary</summary> | ||
</details> |
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,32 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<meta charset="utf-8"> | ||
<title>test for details:open pseudoclass</title> | ||
<link rel="match" href="details-open-pseudo-003-ref.html"> | ||
<link rel="help" href="https://drafts.csswg.org/selectors-4/#open-state"> | ||
|
||
<style> | ||
details { | ||
color: blue; | ||
} | ||
:open { | ||
color: green; | ||
margin-left: 5em; | ||
} | ||
</style> | ||
|
||
<script> | ||
function run() { | ||
document.querySelector("details").open = false; | ||
document.documentElement.classList.remove("reftest-wait"); | ||
} | ||
</script> | ||
|
||
<body onload="run()"> | ||
|
||
<p>The details element should be closed and blue:</p> | ||
|
||
<details open=true> | ||
<summary>Summary</summary> | ||
<p>Detailed content</p> | ||
</details> |