Skip to content

Commit aa6f3d1

Browse files
committed
Finished web design rules jonasschmedtmann#7
1 parent d5b4a41 commit aa6f3d1

File tree

2 files changed

+240
-0
lines changed

2 files changed

+240
-0
lines changed

starter/05-Design/index.html

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ <h1>We design and build better chairs, for a better life</h1>
3333
<h2>What makes our chairs special</h2>
3434
<div class="grid-3-cols">
3535
<div>
36+
<svg
37+
xmlns="http://www.w3.org/2000/svg"
38+
fill="none"
39+
viewBox="0 0 24 24"
40+
stroke-width="1.5"
41+
stroke="currentColor"
42+
class="features-icon"
43+
>
44+
<path
45+
stroke-linecap="round"
46+
stroke-linejoin="round"
47+
d="M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0 1 12 15a9.065 9.065 0 0 0-6.23-.693L5 14.5m14.8.8 1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0 1 12 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5"
48+
/>
49+
</svg>
50+
3651
<p class="features-title"><strong>Science meets design</strong></p>
3752
<p class="features-text">
3853
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Natus
@@ -41,6 +56,21 @@ <h2>What makes our chairs special</h2>
4156
</div>
4257

4358
<div>
59+
<svg
60+
xmlns="http://www.w3.org/2000/svg"
61+
fill="none"
62+
viewBox="0 0 24 24"
63+
stroke-width="1.5"
64+
stroke="currentColor"
65+
class="features-icon"
66+
>
67+
<path
68+
stroke-linecap="round"
69+
stroke-linejoin="round"
70+
d="M15.182 15.182a4.5 4.5 0 0 1-6.364 0M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Z"
71+
/>
72+
</svg>
73+
4474
<p class="features-title">
4575
<strong>Maximal comfort</strong>
4676
</p>
@@ -51,6 +81,21 @@ <h2>What makes our chairs special</h2>
5181
</div>
5282

5383
<div>
84+
<svg
85+
xmlns="http://www.w3.org/2000/svg"
86+
fill="none"
87+
viewBox="0 0 24 24"
88+
stroke-width="1.5"
89+
stroke="currentColor"
90+
class="features-icon"
91+
>
92+
<path
93+
stroke-linecap="round"
94+
stroke-linejoin="round"
95+
d="M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"
96+
/>
97+
</svg>
98+
5499
<p class="features-title">
55100
<strong>Ethical and sustainable</strong>
56101
</p>
@@ -86,16 +131,76 @@ <h2>Our bestselling chairs</h2>
86131
<h3>The Laid Back</h3>
87132
<ul class="chair-details">
88133
<li>
134+
<svg
135+
xmlns="http://www.w3.org/2000/svg"
136+
fill="none"
137+
viewBox="0 0 24 24"
138+
stroke-width="1.5"
139+
stroke="currentColor"
140+
class="chair-icon"
141+
>
142+
<path
143+
stroke-linecap="round"
144+
stroke-linejoin="round"
145+
d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"
146+
/>
147+
</svg>
148+
89149
<!-- Span is a generic INLINE text element, it doesn't have any meaning. It's like a div element, but inline -->
90150
<span>Leisure and relaxing</span>
91151
</li>
92152
<li>
153+
<svg
154+
xmlns="http://www.w3.org/2000/svg"
155+
fill="none"
156+
viewBox="0 0 24 24"
157+
stroke-width="1.5"
158+
stroke="currentColor"
159+
class="chair-icon"
160+
>
161+
<path
162+
stroke-linecap="round"
163+
stroke-linejoin="round"
164+
d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
165+
/>
166+
</svg>
167+
93168
<span>Comfortable for 4h</span>
94169
</li>
95170
<li>
171+
<svg
172+
xmlns="http://www.w3.org/2000/svg"
173+
fill="none"
174+
viewBox="0 0 24 24"
175+
stroke-width="1.5"
176+
stroke="currentColor"
177+
class="chair-icon"
178+
>
179+
<path
180+
stroke-linecap="round"
181+
stroke-linejoin="round"
182+
d="m20.893 13.393-1.135-1.135a2.252 2.252 0 0 1-.421-.585l-1.08-2.16a.414.414 0 0 0-.663-.107.827.827 0 0 1-.812.21l-1.273-.363a.89.89 0 0 0-.738 1.595l.587.39c.59.395.674 1.23.172 1.732l-.2.2c-.212.212-.33.498-.33.796v.41c0 .409-.11.809-.32 1.158l-1.315 2.191a2.11 2.11 0 0 1-1.81 1.025 1.055 1.055 0 0 1-1.055-1.055v-1.172c0-.92-.56-1.747-1.414-2.089l-.655-.261a2.25 2.25 0 0 1-1.383-2.46l.007-.042a2.25 2.25 0 0 1 .29-.787l.09-.15a2.25 2.25 0 0 1 2.37-1.048l1.178.236a1.125 1.125 0 0 0 1.302-.795l.208-.73a1.125 1.125 0 0 0-.578-1.315l-.665-.332-.091.091a2.25 2.25 0 0 1-1.591.659h-.18c-.249 0-.487.1-.662.274a.931.931 0 0 1-1.458-1.137l1.411-2.353a2.25 2.25 0 0 0 .286-.76m11.928 9.869A9 9 0 0 0 8.965 3.525m11.928 9.868A9 9 0 1 1 8.965 3.525"
183+
/>
184+
</svg>
185+
96186
<span>Vegan leather</span>
97187
</li>
98188
<li>
189+
<svg
190+
xmlns="http://www.w3.org/2000/svg"
191+
fill="none"
192+
viewBox="0 0 24 24"
193+
stroke-width="1.5"
194+
stroke="currentColor"
195+
class="chair-icon"
196+
>
197+
<path
198+
stroke-linecap="round"
199+
stroke-linejoin="round"
200+
d="m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"
201+
/>
202+
</svg>
203+
99204
<span>Weighs 16 kg</span>
100205
</li>
101206
</ul>
@@ -112,15 +217,71 @@ <h3>The Laid Back</h3>
112217
<h3>The Worker Bee</h3>
113218
<ul class="chair-details">
114219
<li>
220+
<svg
221+
xmlns="http://www.w3.org/2000/svg"
222+
fill="none"
223+
viewBox="0 0 24 24"
224+
stroke-width="1.5"
225+
stroke="currentColor"
226+
class="chair-icon"
227+
>
228+
<path
229+
stroke-linecap="round"
230+
stroke-linejoin="round"
231+
d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"
232+
/>
233+
</svg>
115234
<span>Work</span>
116235
</li>
117236
<li>
237+
<svg
238+
xmlns="http://www.w3.org/2000/svg"
239+
fill="none"
240+
viewBox="0 0 24 24"
241+
stroke-width="1.5"
242+
stroke="currentColor"
243+
class="chair-icon"
244+
>
245+
<path
246+
stroke-linecap="round"
247+
stroke-linejoin="round"
248+
d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
249+
/>
250+
</svg>
118251
<span>Comfortable for 8h</span>
119252
</li>
120253
<li>
254+
<svg
255+
xmlns="http://www.w3.org/2000/svg"
256+
fill="none"
257+
viewBox="0 0 24 24"
258+
stroke-width="1.5"
259+
stroke="currentColor"
260+
class="chair-icon"
261+
>
262+
<path
263+
stroke-linecap="round"
264+
stroke-linejoin="round"
265+
d="m20.893 13.393-1.135-1.135a2.252 2.252 0 0 1-.421-.585l-1.08-2.16a.414.414 0 0 0-.663-.107.827.827 0 0 1-.812.21l-1.273-.363a.89.89 0 0 0-.738 1.595l.587.39c.59.395.674 1.23.172 1.732l-.2.2c-.212.212-.33.498-.33.796v.41c0 .409-.11.809-.32 1.158l-1.315 2.191a2.11 2.11 0 0 1-1.81 1.025 1.055 1.055 0 0 1-1.055-1.055v-1.172c0-.92-.56-1.747-1.414-2.089l-.655-.261a2.25 2.25 0 0 1-1.383-2.46l.007-.042a2.25 2.25 0 0 1 .29-.787l.09-.15a2.25 2.25 0 0 1 2.37-1.048l1.178.236a1.125 1.125 0 0 0 1.302-.795l.208-.73a1.125 1.125 0 0 0-.578-1.315l-.665-.332-.091.091a2.25 2.25 0 0 1-1.591.659h-.18c-.249 0-.487.1-.662.274a.931.931 0 0 1-1.458-1.137l1.411-2.353a2.25 2.25 0 0 0 .286-.76m11.928 9.869A9 9 0 0 0 8.965 3.525m11.928 9.868A9 9 0 1 1 8.965 3.525"
266+
/>
267+
</svg>
121268
<span>Vegan leather</span>
122269
</li>
123270
<li>
271+
<svg
272+
xmlns="http://www.w3.org/2000/svg"
273+
fill="none"
274+
viewBox="0 0 24 24"
275+
stroke-width="1.5"
276+
stroke="currentColor"
277+
class="chair-icon"
278+
>
279+
<path
280+
stroke-linecap="round"
281+
stroke-linejoin="round"
282+
d="m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"
283+
/>
284+
</svg>
124285
<span>Weighs 22 kg</span>
125286
</li>
126287
</ul>
@@ -137,15 +298,71 @@ <h3>The Worker Bee</h3>
137298
<h3>The Chair 4/2</h3>
138299
<ul class="chair-details">
139300
<li>
301+
<svg
302+
xmlns="http://www.w3.org/2000/svg"
303+
fill="none"
304+
viewBox="0 0 24 24"
305+
stroke-width="1.5"
306+
stroke="currentColor"
307+
class="chair-icon"
308+
>
309+
<path
310+
stroke-linecap="round"
311+
stroke-linejoin="round"
312+
d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"
313+
/>
314+
</svg>
140315
<span>Leisure and relaxing</span>
141316
</li>
142317
<li>
318+
<svg
319+
xmlns="http://www.w3.org/2000/svg"
320+
fill="none"
321+
viewBox="0 0 24 24"
322+
stroke-width="1.5"
323+
stroke="currentColor"
324+
class="chair-icon"
325+
>
326+
<path
327+
stroke-linecap="round"
328+
stroke-linejoin="round"
329+
d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
330+
/>
331+
</svg>
143332
<span>Comfortable all day!</span>
144333
</li>
145334
<li>
335+
<svg
336+
xmlns="http://www.w3.org/2000/svg"
337+
fill="none"
338+
viewBox="0 0 24 24"
339+
stroke-width="1.5"
340+
stroke="currentColor"
341+
class="chair-icon"
342+
>
343+
<path
344+
stroke-linecap="round"
345+
stroke-linejoin="round"
346+
d="m20.893 13.393-1.135-1.135a2.252 2.252 0 0 1-.421-.585l-1.08-2.16a.414.414 0 0 0-.663-.107.827.827 0 0 1-.812.21l-1.273-.363a.89.89 0 0 0-.738 1.595l.587.39c.59.395.674 1.23.172 1.732l-.2.2c-.212.212-.33.498-.33.796v.41c0 .409-.11.809-.32 1.158l-1.315 2.191a2.11 2.11 0 0 1-1.81 1.025 1.055 1.055 0 0 1-1.055-1.055v-1.172c0-.92-.56-1.747-1.414-2.089l-.655-.261a2.25 2.25 0 0 1-1.383-2.46l.007-.042a2.25 2.25 0 0 1 .29-.787l.09-.15a2.25 2.25 0 0 1 2.37-1.048l1.178.236a1.125 1.125 0 0 0 1.302-.795l.208-.73a1.125 1.125 0 0 0-.578-1.315l-.665-.332-.091.091a2.25 2.25 0 0 1-1.591.659h-.18c-.249 0-.487.1-.662.274a.931.931 0 0 1-1.458-1.137l1.411-2.353a2.25 2.25 0 0 0 .286-.76m11.928 9.869A9 9 0 0 0 8.965 3.525m11.928 9.868A9 9 0 1 1 8.965 3.525"
347+
/>
348+
</svg>
146349
<span>Organic cotton</span>
147350
</li>
148351
<li>
352+
<svg
353+
xmlns="http://www.w3.org/2000/svg"
354+
fill="none"
355+
viewBox="0 0 24 24"
356+
stroke-width="1.5"
357+
stroke="currentColor"
358+
class="chair-icon"
359+
>
360+
<path
361+
stroke-linecap="round"
362+
stroke-linejoin="round"
363+
d="m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"
364+
/>
365+
</svg>
149366
<span>Weighs 80 kg</span>
150367
</li>
151368
</ul>

starter/05-Design/style.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ h2 {
5757

5858
display: inline-block;
5959
font-weight: 500;
60+
border-radius: 100px;
6061
}
6162

6263
.btn:hover,
@@ -95,6 +96,7 @@ h1 {
9596
font-size: 44px;
9697
line-height: 1.1;
9798
letter-spacing: -1px;
99+
/* text-shadow: 0 5px 3px rgba(0, 0, 0, 0.07); */
98100
}
99101

100102
.header-text {
@@ -105,10 +107,15 @@ h1 {
105107

106108
img {
107109
width: 100%;
110+
border-radius: 12px;
108111
}
109112

110113
/* FEATURES */
111114
.features-icon {
115+
stroke: #087f5b;
116+
width: 32px;
117+
height: 32px;
118+
margin-bottom: 16px;
112119
}
113120

114121
.features-title {
@@ -126,6 +133,7 @@ img {
126133
background-color: #087f5b;
127134
color: #fff;
128135
padding: 24px;
136+
border-radius: 12px;
129137
}
130138

131139
.testimonial-box {
@@ -146,6 +154,16 @@ img {
146154
}
147155

148156
/* CHAIRS */
157+
.chair {
158+
box-shadow: 0 20px 30px 0 rgba(0, 0, 0, 0.07);
159+
border-radius: 12px;
160+
}
161+
162+
.chair img {
163+
border-bottom-left-radius: 0;
164+
border-bottom-right-radius: 0;
165+
}
166+
149167
.chair-box {
150168
padding: 24px;
151169
}
@@ -172,6 +190,9 @@ h3 {
172190
}
173191

174192
.chair-icon {
193+
stroke: #087f5b;
194+
width: 24px;
195+
height: 24px;
175196
}
176197

177198
.chair-price {
@@ -189,3 +210,5 @@ footer {
189210
/* Completed video lecture on Web Design Rules #1: Typography */
190211

191212
/* Start at Web Design Rules #3: Images and Illustrations */
213+
214+
/* Start at Web Design Rules #8: Visual Hierarchy */

0 commit comments

Comments
 (0)