-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo.html
269 lines (239 loc) · 8.32 KB
/
demo.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!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>Document</title>
<link rel="stylesheet" href="crucial.css" />
<link rel="stylesheet" href="utilities.css" />
<style>
.box {
height: 200px;
background: rgb(19, 19, 19);
color: white;
padding: var(--gutter);
text-align: center;
display: flex;
justify-content: center;
flex-direction: column;
}
.card-grid .box {
margin: 0;
}
.box p,
.box h1 {
font-size: clamp(1.8rem, 3vw, 4rem);
}
h2 {
margin-bottom: 1em;
margin-top: 3em;
}
h2:first-child {
margin-top: 0;
}
.box span {
font-size: clamp(1.4rem, 3vw, 1.6rem);
display: block;
}
div .box {
border-radius: 15px;
}
.container-left .box {
border-radius: 0 15px 15px 0;
}
.container-right .box {
border-radius: 15px 0 0 15px;
}
.full-width .box {
border-radius: 0;
}
header {
margin-bottom: 50px;
}
footer {
margin-top: 30px;
}
.element {
position: absolute;
right: -90px;
width: 100px;
height: 100%;
background: blue;
}
</style>
</head>
<body class="page-wrap">
<header>
<div class="box"><p>I am a box</p></div>
</header>
<div class="vertical-spacing">
<div class="container section">
<h2>I am text inside a container</h2>
<div class="box">
<p>I am a box inside a container</p>
<span>
(Tip: Be wary of styling on the actual container element because its
got those crucial paddings on left and right. Probably best to place
items inside me and you wont have any layout issues.)
</span>
</div>
<p>
I am text inside the container. Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Quae, nesciunt, vitae, distinctio
molestias amet facere commodi ipsa minima deserunt ut modi repellendus
corrupti similique eaque odio sint dicta ullam animi!
</p>
</div>
<div class="container-fluid section">
<h2>I am text in a container fluid</h2>
<div class="box">
<p>I am a box inside a container fluid</p>
<span>
(Hint: make your viewport wider than 1200px to see me grow)
</span>
</div>
<p>
I am text inside the container. Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Quae, nesciunt, vitae, distinctio
molestias amet facere commodi ipsa minima deserunt ut modi repellendus
corrupti similique eaque odio sint dicta ullam animi!
</p>
</div>
<div class="container-left section">
<div class="box"><p>I am a container-left</p></div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
</div>
<div class="container-right section">
<div class="box"><p>I am a container-right</p></div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
</div>
<div class="container-content articles">
<h2>I am text in a container-content</h2>
<div class="box">
<p>I am a box inside a container content</p>
<span>
(Tip: Great use for when you get a large article back from a CMS and
cannot separate it easily and there are some sections that need to
break out of the typical content-width size)
</span>
</div>
<p>
I am text inside the container content. I typically come from a cms or
a large bucket of content which cannot easily be split up. You might
need to style container-content a bit further to your liking.
</p>
<h2>I am text in a container content</h2>
<p>
I am text inside the container. Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Quae, nesciunt, vitae, distinctio
molestias amet facere commodi ipsa minima deserunt ut modi repellendus
corrupti similique eaque odio sint dicta ullam animi!
</p>
<img src="https://picsum.photos/800/600" alt="demo-image" />
<p>
I am text inside the container. Lorem ipsum dolor sit amet,
consectetur adipisicing elit. Quae, nesciunt, vitae, distinctio
molestias amet facere commodi ipsa minima deserunt ut modi repellendus
corrupti similique eaque odio sint dicta ullam animi!
</p>
<div class="container">
<div class="box">
<p>I am a container inside the content-container.</p>
<span>
I break out and match a regular container. The one thing I am
missing is padding on left and right because container-content has
that for me.
</span>
</div>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
<div class="container-fluid">
<div class="box">
<p>I am a container-fluid inside the content-container.</p>
<span>
I break out and match a regular container-fluid exactly.
</span>
</div>
<div class="container-content">
<p>lldkjd nks</p>
</div>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
<div class="full-width">
<div class="box">
<p>I am a full-width element inside the content-container.</p>
<span>
I break out and fill the viewport giving you back full control.
</span>
</div>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae,
nesciunt, vitae, distinctio molestias amet facere commodi ipsa minima
deserunt ut modi repellendus corrupti similique eaque odio sint dicta
ullam animi!
</p>
</div>
<div class="container card-grid">
<div class="box">
<p>I</p>
</div>
<div class="box">
<p>Am</p>
</div>
<div class="box">
<p>A</p>
</div>
<div class="box">
<p>Card</p>
</div>
<div class="box">
<p>Grid</p>
</div>
</div>
<!-- Container-content -->
</div>
<footer>
<div class="box"><p>The End.</p></div>
</footer>
</body>
</html>