Skip to content

Commit a014c28

Browse files
committed
responsive omnifood
1 parent ae2f6c2 commit a014c28

File tree

4 files changed

+1313
-1062
lines changed

4 files changed

+1313
-1062
lines changed

starter/08-Omnifood-Responsive/css/general.css

Lines changed: 107 additions & 101 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
@@ -57,226 +58,231 @@ Medium: 11px
5758
*/
5859

5960
* {
60-
padding: 0;
61-
margin: 0;
62-
box-sizing: border-box;
61+
padding: 0;
62+
margin: 0;
63+
box-sizing: border-box;
6364
}
6465

6566
html {
66-
/* font-size: 10px; */
67-
/* 10px / 16px = 0.625 = 62.5% */
68-
/* Percentage of user's browser font-size setting */
69-
font-size: 62.5%;
67+
/* font-size: 10px; */
68+
/* 10px / 16px = 0.625 = 62.5% */
69+
/* Percentage of user's browser font-size setting */
70+
font-size: 62.5%;
71+
/* overflow-x: hidden; */
7072
}
7173

7274
body {
73-
font-family: "Rubik", sans-serif;
74-
line-height: 1;
75-
font-weight: 400;
76-
color: #555;
75+
font-family: "Rubik", sans-serif;
76+
line-height: 1;
77+
font-weight: 400;
78+
color: #555;
79+
80+
/* Only works if there is nothing absolutely positioned in relation to body */
81+
overflow-x: hidden;
7782
}
7883

7984
/**************************/
8085
/* GENRAL REUSABLE COMPONENTS */
8186
/**************************/
8287

8388
.container {
84-
/* 1140px */
85-
max-width: 120rem;
86-
padding: 0 3.2rem;
87-
margin: 0 auto;
89+
/* 1140px */
90+
max-width: 120rem;
91+
padding: 0 3.2rem;
92+
margin: 0 auto;
8893
}
8994

9095
.grid {
91-
display: grid;
92-
column-gap: 6.4rem;
93-
row-gap: 9.6rem;
96+
display: grid;
97+
column-gap: 6.4rem;
98+
row-gap: 9.6rem;
9499

95-
/* margin-bottom: 9.6rem; */
100+
/* margin-bottom: 9.6rem; */
96101
}
97102

98103
/* .grid:last-child {
99104
margin-bottom: 0;
100105
} */
101106

102107
.grid:not(:last-child) {
103-
margin-bottom: 9.6rem;
108+
margin-bottom: 9.6rem;
104109
}
105110

106111
.grid--2-cols {
107-
grid-template-columns: repeat(2, 1fr);
112+
grid-template-columns: repeat(2, 1fr);
108113
}
109114

110115
.grid--3-cols {
111-
grid-template-columns: repeat(3, 1fr);
116+
grid-template-columns: repeat(3, 1fr);
112117
}
113118

114119
.grid--4-cols {
115-
grid-template-columns: repeat(4, 1fr);
120+
grid-template-columns: repeat(4, 1fr);
116121
}
117122

118123
.grid--5-cols {
119-
grid-template-columns: repeat(5, 1fr);
124+
grid-template-columns: repeat(5, 1fr);
120125
}
121126

122127
.grid--center-v {
123-
align-items: center;
128+
align-items: center;
124129
}
125130

126131
.heading-primary,
127132
.heading-secondary,
128133
.heading-tertiary {
129-
font-weight: 700;
130-
color: #333;
131-
/* color: #45260a; */
132-
/* color: #343a40; */
133-
letter-spacing: -0.5px;
134+
font-weight: 700;
135+
color: #333;
136+
/* color: #45260a; */
137+
/* color: #343a40; */
138+
letter-spacing: -0.5px;
134139
}
135140

136141
.heading-primary {
137-
font-size: 5.2rem;
138-
line-height: 1.05;
139-
margin-bottom: 3.2rem;
142+
font-size: 5.2rem;
143+
line-height: 1.05;
144+
margin-bottom: 3.2rem;
140145
}
141146

142147
.heading-secondary {
143-
font-size: 4.4rem;
144-
line-height: 1.2;
145-
margin-bottom: 9.6rem;
148+
font-size: 4.4rem;
149+
line-height: 1.2;
150+
margin-bottom: 9.6rem;
146151
}
147152

148153
.heading-tertiary {
149-
font-size: 3rem;
150-
line-height: 1.2;
151-
margin-bottom: 3.2rem;
154+
font-size: 3rem;
155+
line-height: 1.2;
156+
margin-bottom: 3.2rem;
152157
}
153158

154159
.subheading {
155-
display: block;
156-
font-size: 1.6rem;
157-
font-weight: 500;
158-
color: #cf711f;
159-
text-transform: uppercase;
160-
margin-bottom: 1.6rem;
161-
letter-spacing: 0.75px;
160+
display: block;
161+
font-size: 1.6rem;
162+
font-weight: 500;
163+
color: #cf711f;
164+
text-transform: uppercase;
165+
margin-bottom: 1.6rem;
166+
letter-spacing: 0.75px;
162167
}
163168

164169
.btn,
165170
.btn:link,
166171
.btn:visited {
167-
display: inline-block;
172+
display: inline-block;
168173

169-
text-decoration: none;
170-
font-size: 2rem;
171-
font-weight: 600;
172-
padding: 1.6rem 3.2rem;
173-
border-radius: 9px;
174+
text-decoration: none;
175+
font-size: 2rem;
176+
font-weight: 600;
177+
padding: 1.6rem 3.2rem;
178+
border-radius: 9px;
174179

175-
/* Only necessary for .btn */
176-
border: none;
177-
cursor: pointer;
178-
font-family: inherit;
180+
/* Only necessary for .btn */
181+
border: none;
182+
cursor: pointer;
183+
font-family: inherit;
179184

180-
/* Put transition on original "state" */
181-
/* transition: background-color 0.3s; */
182-
transition: all 0.3s;
185+
/* Put transition on original "state" */
186+
/* transition: background-color 0.3s; */
187+
transition: all 0.3s;
183188
}
184189

185190
.btn--full:link,
186191
.btn--full:visited {
187-
background-color: #e67e22;
188-
color: #fff;
192+
background-color: #e67e22;
193+
color: #fff;
189194
}
190195

191196
.btn--full:hover,
192197
.btn--full:active {
193-
background-color: #cf711f;
198+
background-color: #cf711f;
194199
}
195200

196201
.btn--outline:link,
197202
.btn--outline:visited {
198-
background-color: #fff;
199-
color: #555;
203+
background-color: #fff;
204+
color: #555;
200205
}
201206

202207
.btn--outline:hover,
203208
.btn--outline:active {
204-
background-color: #fdf2e9;
209+
background-color: #fdf2e9;
205210

206-
/* border: 3px solid #fff; */
211+
/* border: 3px solid #fff; */
207212

208-
/* Trick to add border inside */
209-
box-shadow: inset 0 0 0 3px #fff;
213+
/* Trick to add border inside */
214+
box-shadow: inset 0 0 0 3px #fff;
210215
}
211216

212217
.btn--form {
213-
background-color: #45260a;
214-
color: #fdf2e9;
215-
align-self: end;
216-
padding: 1.2rem;
218+
background-color: #45260a;
219+
color: #fdf2e9;
220+
align-self: end;
221+
padding: 1.2rem;
217222
}
218223

219224
.btn--form:hover {
220-
background-color: #fff;
221-
color: #555;
225+
background-color: #fff;
226+
color: #555;
222227
}
223228

224229
.link:link,
225230
.link:visited {
226-
display: inline-block;
227-
color: #e67e22;
228-
text-decoration: none;
229-
border-bottom: 1px solid currentColor;
230-
padding-bottom: 2px;
231-
transition: all 0.3s;
231+
display: inline-block;
232+
color: #e67e22;
233+
text-decoration: none;
234+
border-bottom: 1px solid currentColor;
235+
padding-bottom: 2px;
236+
transition: all 0.3s;
232237
}
233238

234239
.link:hover,
235240
.link:active {
236-
color: #cf711f;
237-
border-bottom: 1px solid transparent;
241+
color: #cf711f;
242+
border-bottom: 1px solid transparent;
238243
}
239244

240245
.list {
241-
list-style: none;
242-
display: flex;
243-
flex-direction: column;
244-
gap: 1.6rem;
246+
list-style: none;
247+
display: flex;
248+
flex-direction: column;
249+
gap: 1.6rem;
245250
}
246251

247252
.list-item {
248-
font-size: 1.8rem;
249-
display: flex;
250-
align-items: center;
251-
gap: 1.6rem;
253+
font-size: 1.8rem;
254+
display: flex;
255+
align-items: center;
256+
gap: 1.6rem;
257+
line-height: 1.2;
252258
}
253259

254260
.list-icon {
255-
width: 3rem;
256-
height: 3rem;
257-
color: #e67e22;
261+
width: 3rem;
262+
height: 3rem;
263+
color: #e67e22;
258264
}
259265

260266
*:focus {
261-
outline: none;
262-
/* outline: 4px dotted #e67e22; */
263-
/* outline-offset: 8px; */
264-
box-shadow: 0 0 0 0.8rem rgba(230, 125, 34, 0.5);
267+
outline: none;
268+
/* outline: 4px dotted #e67e22; */
269+
/* outline-offset: 8px; */
270+
box-shadow: 0 0 0 0.8rem rgba(230, 125, 34, 0.5);
265271
}
266272

267273
/* HELPER/SETTINGS CLASSES */
268274
.margin-right-sm {
269-
margin-right: 1.6rem !important;
275+
margin-right: 1.6rem !important;
270276
}
271277

272278
.margin-bottom-md {
273-
margin-bottom: 4.8rem !important;
279+
margin-bottom: 4.8rem !important;
274280
}
275281

276282
.center-text {
277-
text-align: center;
283+
text-align: center;
278284
}
279285

280286
strong {
281-
font-weight: 500;
287+
font-weight: 500;
282288
}

0 commit comments

Comments
 (0)