-
Notifications
You must be signed in to change notification settings - Fork 158
/
logical-top.html
89 lines (82 loc) · 2.3 KB
/
logical-top.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Logical Top</title>
</head>
<body>
<input type="checkbox" name="switch" id="switch" />
<label for="switch">Switch Layouts</label>
<article>
<h2>Verse One</h2>
<div class="text">
<p>So go and run your mouth</p>
<p>Word gets around in the underground</p>
<p>Let em talk, let em talk</p>
<p>Their words mean nothing at all</p>
<p>Let em walk, let em walk</p>
<p>Never been one for the dead weight</p>
</div>
</article>
<article>
<h2>Verse Two</h2>
<div class="text">
<p>Let em fall</p>
<p>Let em talk, let em talk</p>
<p>Let em waste their breath</p>
<p>We don't care at all</p>
<p>Let em walk, let em walk</p>
<p>Never been one for the dead weight</p>
<p>Let em fall</p>
<p>Let em talk, let em talk</p>
<p>Their words mean nothing at all</p>
<p>Let em walk, let em walk</p>
<p>Never been one for the dead weight</p>
<p>Let em fall</p>
</div>
</article>
<style>
h2 {
margin: 0; /* zero out UA style */
/*
Block = top and bottom
Inline = left and right
end = right or bottom
start = left or top
*/
border-block-end: 3px solid #ffc000;
padding-block: 10px;
padding-inline: 20px;
margin-block-end: 10px;
}
#switch:checked ~ article {
grid-template-columns: auto 1fr;
}
#switch:checked ~ article h2 {
writing-mode: vertical-lr;
}
/* NOT important */
html {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Open Sans", "Helvetica Neue", sans-serif;
}
p {
margin: 0;
margin-bottom: 10px;
line-height: 1;
}
h2 {
background: black;
color: white;
font-size: 30px;
text-transform: uppercase;
}
article {
margin-bottom: 10px;
display: grid;
}
</style>
</body>
</html>