Skip to content

Commit 1b4c505

Browse files
committed
Add progress for section 7
1 parent e827da5 commit 1b4c505

File tree

4 files changed

+552
-50
lines changed

4 files changed

+552
-50
lines changed

attempt/07-Omnifood-Desktop/css/general.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Default: 1
1515
Small: 1.05
1616
Medium: 1.2
1717
Paragraph default: 1.6
18+
Large: 1.8
1819
1920
- Letter spacing
2021
-0.5px
@@ -64,16 +65,21 @@ Medium: 11px
6465

6566
html {
6667
/* font-size: 10px; */
68+
6769
/* 10px / 16px = 0.625 = 62.5% */
6870
/* Percentage of user's browser font-size setting */
6971
font-size: 62.5%;
72+
overflow-x: hidden;
7073
}
7174

7275
body {
7376
font-family: "Rubik", sans-serif;
7477
line-height: 1;
7578
font-weight: 400;
7679
color: #555;
80+
81+
/* Only works if there is nothing absolutely positioned in relation to body */
82+
overflow-x: hidden;
7783
}
7884

7985
/**************************/
@@ -96,8 +102,8 @@ body {
96102
}
97103

98104
/* .grid:last-child {
99-
margin-bottom: 0;
100-
} */
105+
margin-bottom: 0;
106+
} */
101107

102108
.grid:not(:last-child) {
103109
margin-bottom: 9.6rem;
@@ -115,9 +121,9 @@ body {
115121
grid-template-columns: repeat(4, 1fr);
116122
}
117123

118-
.grid--5-cols {
124+
/* .grid--5-cols {
119125
grid-template-columns: repeat(5, 1fr);
120-
}
126+
} */
121127

122128
.grid--center-v {
123129
align-items: center;
@@ -249,6 +255,7 @@ body {
249255
display: flex;
250256
align-items: center;
251257
gap: 1.6rem;
258+
line-height: 1.2;
252259
}
253260

254261
.list-icon {
Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
/* rem and em do NOT depend on html font-size in media queries! Instead, 1rem = 1em = 16px */
2+
3+
/**************************/
4+
/* BELOW 1344px (Smaller desktops) */
5+
/**************************/
6+
7+
@media (max-width: 84em) {
8+
.hero {
9+
max-width: 120rem;
10+
}
11+
12+
.heading-primary {
13+
font-size: 4.4rem;
14+
}
15+
16+
.gallery {
17+
grid-template-columns: repeat(2, 1fr);
18+
}
19+
}
20+
21+
/**************************/
22+
/* BELOW 1200px (Landscape Tablets) */
23+
/**************************/
24+
25+
@media (max-width: 75em) {
26+
html {
27+
/* 9px / 16px */
28+
font-size: 56.25%;
29+
}
30+
31+
.grid {
32+
column-gap: 4.8rem;
33+
row-gap: 6.4rem;
34+
}
35+
36+
.heading-secondary {
37+
font-size: 3.6rem;
38+
}
39+
40+
.heading-tertiary {
41+
font-size: 2.4rem;
42+
}
43+
44+
.header {
45+
padding: 0 3.2rem;
46+
}
47+
48+
.main-nav-list {
49+
gap: 3.2rem;
50+
}
51+
52+
.hero {
53+
gap: 4.8rem;
54+
}
55+
56+
.testimonials-container {
57+
padding: 9.6rem 3.2rem;
58+
}
59+
}
60+
61+
/**************************/
62+
/* BELOW 944px (Tablets) */
63+
/**************************/
64+
65+
@media (max-width: 59em) {
66+
html {
67+
/* 8px / 16px = 0.5 = 50% */
68+
font-size: 50%;
69+
}
70+
71+
.hero {
72+
grid-template-columns: 1fr;
73+
padding: 0 8rem;
74+
gap: 6.4rem;
75+
}
76+
77+
.hero-text-box,
78+
.hero-img-box {
79+
text-align: center;
80+
}
81+
82+
.hero-img {
83+
width: 60%;
84+
}
85+
86+
.delivered-meals {
87+
justify-content: center;
88+
margin-top: 3.2rem;
89+
}
90+
91+
.logos img {
92+
height: 2.4rem;
93+
}
94+
95+
.step-number {
96+
font-size: 7.4rem;
97+
}
98+
99+
.meal-content {
100+
padding: 2.4rem 3.2rem 3.2rem 3.2rem;
101+
}
102+
103+
.section-testimonials {
104+
grid-template-columns: 1fr;
105+
}
106+
107+
.gallery {
108+
grid-template-columns: repeat(6, 1fr);
109+
}
110+
111+
.cta {
112+
/* 3/5 = 60% + 2/5 = 40% */
113+
grid-template-columns: 3fr 2fr;
114+
}
115+
116+
.cta-form {
117+
grid-template-columns: 1fr;
118+
}
119+
120+
.btn--form {
121+
margin-top: 1.2rem;
122+
}
123+
124+
/* MOBILE NAVIGATION */
125+
.btn-mobile-nav {
126+
display: block;
127+
}
128+
129+
.main-nav {
130+
background-color: rgba(255, 255, 255, 0.97);
131+
position: absolute;
132+
top: 0;
133+
left: 0;
134+
width: 100%;
135+
height: 100vh;
136+
transform: translateX(100%);
137+
138+
display: flex;
139+
align-items: center;
140+
justify-content: center;
141+
transition: all 0.5s ease-in;
142+
143+
/* Hide navigation */
144+
/* Allows NO transitions at all */
145+
/* display: none; */
146+
147+
/* 1) Hide it visually */
148+
opacity: 0;
149+
150+
/* 2) Make it unaccessible to mouse and keyboard */
151+
pointer-events: none;
152+
153+
/* 3) Hide it from screen readers */
154+
visibility: hidden;
155+
}
156+
157+
.nav-open .main-nav {
158+
opacity: 1;
159+
pointer-events: auto;
160+
visibility: visible;
161+
transform: translateX(0);
162+
}
163+
164+
.nav-open .icon-mobile-nav[name="close-outline"] {
165+
display: block;
166+
}
167+
168+
.nav-open .icon-mobile-nav[name="menu-outline"] {
169+
display: none;
170+
}
171+
172+
.main-nav-list {
173+
flex-direction: column;
174+
gap: 4.8rem;
175+
}
176+
177+
.main-nav-link:link,
178+
.main-nav-link:visited {
179+
font-size: 3rem;
180+
}
181+
}
182+
183+
/**************************/
184+
/* BELOW 704px (Smaller tablets) */
185+
/**************************/
186+
187+
@media (max-width: 44em) {
188+
.grid--3-cols,
189+
.grid--4-cols {
190+
grid-template-columns: repeat(2, 1fr);
191+
}
192+
193+
.diets {
194+
grid-column: 1 / -1;
195+
justify-self: center;
196+
}
197+
198+
.heading-secondary {
199+
margin-bottom: 4.8rem;
200+
}
201+
202+
.pricing-plan {
203+
width: 100%;
204+
}
205+
206+
.grid--footer {
207+
grid-template-columns: repeat(6, 1fr);
208+
}
209+
210+
.logo-col,
211+
.address-col {
212+
grid-column: span 3;
213+
}
214+
215+
.nav-col {
216+
grid-row: 1;
217+
grid-column: span 2;
218+
margin-bottom: 3.2rem;
219+
}
220+
}
221+
222+
/**************************/
223+
/* BELOW 544px (Phones) */
224+
/**************************/
225+
226+
@media (max-width: 34em) {
227+
.grid {
228+
row-gap: 4.8rem;
229+
}
230+
231+
.grid--2-cols,
232+
.grid--3-cols,
233+
.grid--4-cols {
234+
grid-template-columns: 1fr;
235+
}
236+
237+
.btn,
238+
.btn:link,
239+
.btn:visited {
240+
padding: 2.4rem 1.6rem;
241+
}
242+
243+
.section-hero {
244+
padding: 2.4rem 0 6.4rem 0;
245+
}
246+
247+
.hero {
248+
padding: 0 3.2rem;
249+
}
250+
251+
.hero-img {
252+
width: 80%;
253+
}
254+
255+
.logos img {
256+
height: 1.2rem;
257+
}
258+
259+
.step-img-box:nth-child(2) {
260+
grid-row: 1;
261+
}
262+
263+
.step-img-box:nth-child(6) {
264+
grid-row: 5;
265+
}
266+
267+
.step-img-box {
268+
transform: translateY(2.4rem);
269+
}
270+
271+
.testimonials {
272+
grid-template-columns: 1fr;
273+
}
274+
275+
.gallery {
276+
grid-template-columns: repeat(4, 1fr);
277+
gap: 1.2rem;
278+
}
279+
280+
.cta {
281+
grid-template-columns: 1fr;
282+
}
283+
284+
.cta-text-box {
285+
padding: 3.2rem;
286+
}
287+
288+
.cta-img-box {
289+
height: 32rem;
290+
grid-row: 1;
291+
}
292+
}
293+
294+
/*
295+
- Font sizes (px)
296+
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98
297+
298+
- Spacing system (px)
299+
2 / 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 80 / 96 / 128
300+
*/

0 commit comments

Comments
 (0)