-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* indeterminate, defined * lin & size * Update live-examples/css-examples/pseudo-class/defined.html Co-authored-by: Estelle Weyl <estelle@openwebdocs.org> * Update live-examples/css-examples/pseudo-class/indeterminate.html Co-authored-by: Estelle Weyl <estelle@openwebdocs.org> --------- Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
- Loading branch information
1 parent
8d776bb
commit 80a67b5
Showing
7 changed files
with
79 additions
and
0 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,9 @@ | ||
.all-elements > * { | ||
display: block; | ||
margin: 20px 0; | ||
} | ||
|
||
.all-elements > *:defined { | ||
outline: 2px solid deeppink; | ||
outline-offset: 2px; | ||
} |
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,9 @@ | ||
<div class="all-elements"> | ||
<p>This is an ordinary <b>&;lt;p></b> element.</p> | ||
|
||
<invalid>This <b>&;lt;invalid></b> element is not defined, but has no hyphen.</invalid> | ||
|
||
<not-registered>This <b>&;lt;not-registered></b> element is neither defined nor registered.</not-registered> | ||
|
||
<registered-custom>This <b>&;lt;registered-custom></b> element is registered.</registered-custom> | ||
</div> |
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,3 @@ | ||
class RegisteredCustom extends HTMLElement {} | ||
|
||
customElements.define('registered-custom', RegisteredCustom); |
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,9 @@ | ||
label { | ||
display: block; | ||
margin-top: 0.3em; | ||
} | ||
|
||
*:indeterminate { | ||
outline: 2px solid deeppink; | ||
outline-offset: 2px; | ||
} |
12 changes: 12 additions & 0 deletions
12
live-examples/css-examples/pseudo-class/indeterminate.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,12 @@ | ||
<form> | ||
<p>How did you find out about us?</p> | ||
<label><input name="origin" type="radio" value="duck"> Duck-duck-go</label> | ||
<label><input name="origin" type="radio" value="mastodon"> Mastodon</label> | ||
|
||
<p>Choose your subscriptions:</p> | ||
<label><input id="newsletter" name="newsletter" type="checkbox"> Newsletter</label> | ||
<label><input id="premium" disabled name="premium" type="checkbox"> Premium Card</label> | ||
|
||
<p>Please wait for rest of the form:</p> | ||
<progress id="loading"></progress> | ||
</form> |
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 @@ | ||
var newsletter = document.getElementById('newsletter'); | ||
var premium = document.getElementById('premium'); | ||
|
||
premium.indeterminate = true; | ||
|
||
newsletter.addEventListener('change', function() { | ||
if (this.checked) { | ||
premium.disabled = false; | ||
premium.indeterminate = false; | ||
} else { | ||
premium.checked = false; | ||
premium.disabled = true; | ||
premium.indeterminate = true; | ||
} | ||
}); |
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