Skip to content

Commit 0a7da0f

Browse files
committed
Section 8 - Responsive design. Desktop + Tablet
1 parent 2951cf8 commit 0a7da0f

File tree

4 files changed

+124
-1
lines changed

4 files changed

+124
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ strong {
257257
display: flex;
258258
align-items: center;
259259
gap: 1.6rem;
260+
line-height: 1.2rem;
260261
}
261262

262263
.list-icon {
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
/*
2+
rem and em do not depend on html
3+
font size in html media queries
4+
5+
/**********************/
6+
/* Below 1344px - Small Laptops */
7+
/**********************/
8+
@media (max-width: 84em) {
9+
.hero {
10+
max-width: 120rem;
11+
}
12+
13+
.heading-primary {
14+
font-size: 4.4rem;
15+
}
16+
17+
.gallery {
18+
grid-template-columns: 1fr 1fr;
19+
}
20+
}
21+
22+
/**********************/
23+
/* Below 1200px - Landscape tablets */
24+
/**********************/
25+
@media (max-width: 75em) {
26+
html {
27+
/* font-size: 9px; */
28+
/* 9px / 16px */
29+
font-size: 56.25%;
30+
}
31+
32+
.grid {
33+
column-gap: 4.8rem;
34+
row-gap: 6.4rem;
35+
}
36+
37+
.heading-secondary {
38+
font-size: 3.6rem;
39+
}
40+
41+
.heading-tertiary {
42+
font-size: 2.4rem;
43+
}
44+
45+
.header {
46+
padding: 0 3.2rem;
47+
}
48+
49+
.hero {
50+
gap: 4.8rem;
51+
}
52+
53+
.main-nav-list {
54+
gap: 3.2rem;
55+
}
56+
57+
.testimonials-container {
58+
padding: 9.6rem 3.2rem;
59+
}
60+
}
61+
62+
/**********************/
63+
/* Below 940px - tablets */
64+
/**********************/
65+
@media (max-width: 59em) {
66+
html {
67+
font-size: 50%;
68+
}
69+
70+
.hero {
71+
grid-template-columns: 1fr;
72+
padding: 0 8rem;
73+
gap: 6.4rem;
74+
}
75+
76+
.hero-text-box,
77+
.hero-image-box {
78+
text-align: center;
79+
}
80+
81+
.hero-img {
82+
width: 60%;
83+
}
84+
85+
.delivered-meals {
86+
justify-content: center;
87+
margin-top: 3.2rem;
88+
}
89+
90+
.logos img {
91+
height: 2.4rem;
92+
}
93+
94+
.step-number {
95+
font-size: 7.4rem;
96+
}
97+
98+
.meal-content {
99+
padding: 2.4rem 3.2rem 3.2rem 3.2rem;
100+
}
101+
102+
.section-testimonials {
103+
grid-template-columns: 1fr;
104+
}
105+
106+
.gallery {
107+
grid-template-columns: repeat(6, 1fr);
108+
}
109+
110+
.cta {
111+
grid-template-columns: 3fr 2fr;
112+
}
113+
114+
.cta-form {
115+
grid-template-columns: 1fr;
116+
}
117+
118+
.btn--form {
119+
margin-top: 1.2rem;
120+
}
121+
}

starter/07-Omnifood-Desktop/css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
list-style: none;
2626
display: flex;
2727
align-items: center;
28-
gap: 3.2rem;
28+
gap: 4.8rem;
2929
}
3030

3131
.main-nav-link:link,

starter/07-Omnifood-Desktop/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/>
1313
<link href="css/general.css" rel="stylesheet" />
1414
<link href="css/style.css" rel="stylesheet" />
15+
<link href="css/query.css" rel="stylesheet" />
1516

1617
<script
1718
type="module"

0 commit comments

Comments
 (0)