Base: Add a :focus/:focus-within test page

This commit is contained in:
Sam Atkins 2022-03-20 13:26:59 +00:00 committed by Linus Groh
parent 02497888a6
commit 4827092554
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>:focus and :focus-within test</title>
<style>
:focus {
background-color: magenta;
}
p.focus-within-test:focus-within {
background-color: lime;
}
</style>
</head>
<body>
<h1>:focus and :focus-within test</h1>
<p>
Anything with :focus will have a magenta background.
<button>I'm a button</button>
<input type="text" value="Hello friends!"/>
</p>
<p class="focus-within-test">
This paragraph will turn green if anything inside it is focused.
<button>I'm a button</button>
<input type="text" value="Hello friends!"/>
</p>
</body>
</html>

View file

@ -101,6 +101,7 @@
<li><a href="not-selector.html">:not()</a></li>
<li><a href="where-selector.html">:where()</a></li>
<li><a href="hover.html">:hover</a></li>
<li><a href="focus.html">:focus</a></li>
<li><h3>Properties</h3></li>
<li><a href="backgrounds.html">Backgrounds</a></li>
<li><a href="background-repeat-test.html">Background-repeat</a></li>