-
Notifications
You must be signed in to change notification settings - Fork 0
/
nested.html
61 lines (58 loc) · 1.04 KB
/
nested.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
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1">
<title>Nested Elements</title>
<style>
/* Nested Elements */
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 10pt;
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
}
body {
margin: 1em;
}
article {
padding: 2em;
background: #eee;
border-radius: .3em;
margin: 0 0 1em 0;
}
article:before {
content: '< 200px wide';
}
/* Layout */
@media (min-width: 600px) {
main,
aside {
float: left;
width: calc(60% - .5em);
margin-right: 1em;
}
aside {
width: calc(40% - .5em);
margin-right: 0;
}
}
</style>
<h1>Nesting Container-Query Enabled Elements</h1>
<header>
<h2>Header</h2>
<article></article>
</header>
<section>
<main>
<h2>Main</h2>
<article></article>
<article></article>
</main>
<aside>
<h2>Sidebar</h2>
<article></article>
<article></article>
</aside>
</section>