-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* scope, fullscreen * lint * Update live-examples/css-examples/pseudo-class/scope.html --------- Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
- Loading branch information
1 parent
0681426
commit e3d420f
Showing
7 changed files
with
66 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,10 @@ | ||
#full-screen-section { | ||
border: 1px solid black; | ||
padding: 0.5rem; | ||
} | ||
|
||
#full-screen-section:fullscreen { | ||
background-color: khaki; | ||
color: black; | ||
text-align: center; | ||
} |
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,7 @@ | ||
<p>This paragraph will not be shown in Full-Screen mode, so it will not be matched.</p> | ||
|
||
<div id="full-screen-section"> | ||
<p>This paragraph along with button located below will be shown in Full-Screen mode.</p> | ||
|
||
<button id="full-screen-btn">Open/Close Full-Screen mode</button> | ||
</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,10 @@ | ||
const btn = document.getElementById('full-screen-btn'); | ||
const section = document.getElementById('full-screen-section'); | ||
|
||
btn.addEventListener('click', () => { | ||
if (!document.fullscreenElement) { | ||
section.requestFullscreen(); | ||
} else { | ||
document.exitFullscreen(); | ||
} | ||
}); |
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
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 @@ | ||
#special-paragraph { | ||
font-weight: bold; | ||
} | ||
|
||
.special-s { | ||
text-decoration: underline overline line-through; | ||
color: crimson; | ||
} |
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,5 @@ | ||
<div> | ||
<p id="special-paragraph">The love of my life and the most intriguing woman in the whole world is <s>Alice</s> Ava.</p> | ||
|
||
<p>From the moment I saw her in a <s>coffeehouse</s> bar, I knew she completed me.</p> | ||
</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,4 @@ | ||
const p = document.getElementById('special-paragraph'); | ||
const specialS = p.querySelectorAll(':scope > s'); | ||
|
||
specialS.forEach(s => s.classList.add('special-s')); |