mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-06 16:09:30 +00:00
Base: Add a :focus/:focus-within test page
This commit is contained in:
parent
02497888a6
commit
4827092554
28
Base/res/html/misc/focus.html
Normal file
28
Base/res/html/misc/focus.html
Normal 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>
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue