-
Notifications
You must be signed in to change notification settings - Fork 14
/
to-has-and-has-not.html
executable file
·44 lines (35 loc) · 1.15 KB
/
to-has-and-has-not.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>To has and has not</title>
<style type="text/css">
.arena {display: grid; grid-template-columns: repeat(3,1fr); gap: 1em; width: 47em;}
:is(h1, h2, h3, h4, h5, h6) { margin: 0.25em 0; padding: 0.125em;}
:is(h1, h2, h3, h4, h5, h6):has(img) {border-bottom: 0.25em solid red;}
:is(h1, h2, h3, h4, h5, h6):not(:has(img)) {border-bottom: 0.25em dotted green;}
</style>
</head>
<body>
<section class="arena">
<h1>Text</h1>
<h1><img src="i/short.gif" alt="Image"></h1>
<h1>Text and <img src="i/short.gif" alt="Image"></h1>
<h2>Text</h2>
<h2><img src="i/short.gif" alt="Image"></h2>
<h2>Text and <img src="i/short.gif" alt="Image"></h2>
<h3>Text</h3>
<h3><img src="i/short.gif" alt="Image"></h3>
<h3>Text and <img src="i/short.gif" alt="Image"></h3>
<h4>Text</h4>
<h4><img src="i/short.gif" alt="Image"></h4>
<h4>Text and <img src="i/short.gif" alt="Image"></h4>
<h5>Text</h5>
<h5><img src="i/short.gif" alt="Image"></h5>
<h5>Text and <img src="i/short.gif" alt="Image"></h5>
<h6>Text</h6>
<h6><img src="i/short.gif" alt="Image"></h6>
<h6>Text and <img src="i/short.gif" alt="Image"></h6>
</section>
</body>
</html>