Travis build: 132 [FORCED]
This commit is contained in:
File diff suppressed because one or more lines are too long
78
index.html
78
index.html
@ -42,7 +42,7 @@
|
|||||||
</section>
|
</section>
|
||||||
<section data-type="interactivity" class="sidebar__section">
|
<section data-type="interactivity" class="sidebar__section">
|
||||||
<h4 class="sidebar__section-heading">interactivity</h4>
|
<h4 class="sidebar__section-heading">interactivity</h4>
|
||||||
<a class="sidebar__link" href="#disable-selection"><span>Disable selection</span></a><a class="sidebar__link" href="#mouse-cursor-gradient-tracking"><span>Mouse cursor gradient tracking</span></a><a class="sidebar__link" href="#popout-menu"><span>Popout menu</span></a><a class="sidebar__link" href="#sibling-fade"><span>Sibling fade</span></a><a class="sidebar__link" href="#toggle-switch"><span>Toggle switch</span></a>
|
<a class="sidebar__link" href="#disable-selection"><span>Disable selection</span></a><a class="sidebar__link" href="#focus-within"><span>Focus Within</span></a><a class="sidebar__link" href="#mouse-cursor-gradient-tracking"><span>Mouse cursor gradient tracking</span></a><a class="sidebar__link" href="#popout-menu"><span>Popout menu</span></a><a class="sidebar__link" href="#sibling-fade"><span>Sibling fade</span></a><a class="sidebar__link" href="#toggle-switch"><span>Toggle switch</span></a>
|
||||||
</section>
|
</section>
|
||||||
<section data-type="other" class="sidebar__section">
|
<section data-type="other" class="sidebar__section">
|
||||||
<h4 class="sidebar__section-heading">other</h4>
|
<h4 class="sidebar__section-heading">other</h4>
|
||||||
@ -1188,16 +1188,78 @@ in any specification.</span></p>
|
|||||||
|
|
||||||
<!-- tags: layout -->
|
<!-- tags: layout -->
|
||||||
</div>
|
</div>
|
||||||
|
<div class="snippet">
|
||||||
|
<h3 id="focus-within"><span>Focus Within</span><span class="tags__tag snippet__tag" data-type="visual"><i data-feather="eye"></i>visual</span><span class="tags__tag snippet__tag" data-type="interactivity"><i data-feather="edit-2"></i>interactivity</span></h3>
|
||||||
|
<p>Changes the appearance of a form if any of its children are focused.</p>
|
||||||
|
<h4 data-type="HTML">HTML</h4><pre><code class="lang-html"><div class="focus-within">
|
||||||
|
<form>
|
||||||
|
<label for="given_name">Given Name:</label>
|
||||||
|
<input id="given_name" type="text">
|
||||||
|
<br>
|
||||||
|
<label for="family_name">Family Name:</label>
|
||||||
|
<input id="family_name" type="text">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</code></pre>
|
||||||
|
<h4 data-type="CSS">CSS</h4><pre><code class="lang-css">form {
|
||||||
|
border: 3px solid #2d98da;
|
||||||
|
color: #000000;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
form:focus-within {
|
||||||
|
background: #f7b731;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h4>Demo</h4>
|
||||||
|
<div class="snippet-demo" data-scope="focus-within.md">
|
||||||
|
<div class="focus-within">
|
||||||
|
<form>
|
||||||
|
<label for="given_name">Given Name:</label>
|
||||||
|
<input id="given_name" type="text">
|
||||||
|
<br>
|
||||||
|
<label for="family_name">Family Name:</label>
|
||||||
|
<input id="family_name" type="text">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<style>[data-scope="focus-within.md"] form {
|
||||||
|
border: 3px solid #2d98da;
|
||||||
|
color: #000000;
|
||||||
|
padding: 4px; }
|
||||||
|
[data-scope="focus-within.md"] form:focus-within {
|
||||||
|
background: #f7b731;
|
||||||
|
color: #000000; }
|
||||||
|
</style>
|
||||||
|
<!-- Leave this blank, the build script will generate the demo for you. -->
|
||||||
|
<h4>Explanation</h4>
|
||||||
|
<p>The psuedo class <code>:focus-within</code> applies styles to a parent element if any child element gets focused. For example, an <code>input</code> element inside a <code>form</code> element.</p>
|
||||||
|
<h4>Browser support</h4>
|
||||||
|
<div>
|
||||||
|
<div class="snippet__browser-support">
|
||||||
|
78.9%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p><span class="snippet__support-note">⚠️ Not supported in IE11 or the current version of Edge.</span></p>
|
||||||
|
|
||||||
|
<!-- Whenever possible, link a `caniuse` feature which allows the browser support percentage to be displayed.
|
||||||
|
If no link is provided, it defaults to 99+%. -->
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://caniuse.com/#feat=css-focus-within" target="_blank">https://caniuse.com/#feat=css-focus-within</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- tags: visual, interactivity -->
|
||||||
|
</div>
|
||||||
<div class="snippet">
|
<div class="snippet">
|
||||||
<h3 id="fullscreen"><span>Fullscreen</span><span class="tags__tag snippet__tag" data-type="visual"><i data-feather="eye"></i>visual</span></h3>
|
<h3 id="fullscreen"><span>Fullscreen</span><span class="tags__tag snippet__tag" data-type="visual"><i data-feather="eye"></i>visual</span></h3>
|
||||||
<p>The :fullscreen CSS pseudo-class represents an element that's displayed when the browser is in fullscreen mode.</p>
|
<p>The :fullscreen CSS pseudo-class represents an element that's displayed when the browser is in fullscreen mode.</p>
|
||||||
<h4 data-type="HTML">HTML</h4><pre><code class="lang-html"><div class="container">
|
<h4 data-type="HTML">HTML</h4><pre><code class="lang-html"><div class="container">
|
||||||
<p><em>Click the button below to enter the element into fullscreen mode. </em></p>
|
<p><em>Click the button below to enter the element into fullscreen mode. </em></p>
|
||||||
<div class="element" id="element">
|
<div class="element" id="element"><p>I change color in fullscreen mode!</p></div>
|
||||||
<p>I change color in fullscreen mode!</p>
|
<br />
|
||||||
</div>
|
<button onclick="var el = document.getElementById('element'); el.requestFullscreen();">
|
||||||
<br>
|
Go Full Screen!
|
||||||
<button onclick="var el = document.getElementById('element'); el.requestFullscreen();">Go Full Screen!</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h4 data-type="CSS">CSS</h4><pre><code class="lang-css">.container {
|
<h4 data-type="CSS">CSS</h4><pre><code class="lang-css">.container {
|
||||||
@ -1232,7 +1294,9 @@ in any specification.</span></p>
|
|||||||
<p>I change color in fullscreen mode!</p>
|
<p>I change color in fullscreen mode!</p>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<button onclick="var el = document.getElementById('element'); el.requestFullscreen();">Go Full Screen!</button>
|
<button onclick="var el = document.getElementById('element'); el.requestFullscreen();">
|
||||||
|
Go Full Screen!
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<style>[data-scope="fullscreen.md"] .container {
|
<style>[data-scope="fullscreen.md"] .container {
|
||||||
|
|||||||
@ -7,11 +7,8 @@ Changes the appearance of a form if any of its children are focused.
|
|||||||
```html
|
```html
|
||||||
<div class="focus-within">
|
<div class="focus-within">
|
||||||
<form>
|
<form>
|
||||||
<label for="given_name">Given Name:</label>
|
<label for="given_name">Given Name:</label> <input id="given_name" type="text" /> <br />
|
||||||
<input id="given_name" type="text">
|
<label for="family_name">Family Name:</label> <input id="family_name" type="text" />
|
||||||
<br>
|
|
||||||
<label for="family_name">Family Name:</label>
|
|
||||||
<input id="family_name" type="text">
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user