-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
253 lines (210 loc) · 4.21 KB
/
styles.css
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
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
#root,
#__next {
isolation: isolate;
}
:root {
/*---COLOUR---*/
/* Primary */
--clr-nutmeg: hsl(14, 45%, 36%);
/* Accent */
--clr-drk-raspberry: hsl(332, 51%, 32%);
/* Neutral */
--clr--white: hsl(0, 0%, 100%);
--clr-rose-white: hsl(330, 100%, 98%);
--clr-eggshell: hsl(30, 54%, 90%);
--clr-lgt-grey: hsl(30, 18%, 87%);
--clr-wenge-brown: hsl(30, 10%, 34%);
--clr-drk-charcoal: hsl(24, 5%, 18%);
/*---TYPOGRAPHY---*/
--fs-body: 1rem;
--fs-main-headline: 2.5rem;
--fs-main-headline-smaller: 1.875rem;
--fs-small-heading: 1.25rem;
--fs-small-subheading: 1rem;
--fs-subheading: 1.8rem;
--fs-marker: 0.75rem;
--ff-young-serif: "Young Serif", Serif;
--ff-outfit: "Outfit", sans-serif;
--fw-400: 400;
--fw-600: 600;
--fw-700: 700;
}
body {
font-family: var(--ff-outfit);
font-size: var(--fs-body);
color: var(--clr-wenge-brown);
background-color: var(--clr-eggshell);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
/* Undoing the line-height reset just for headings*/
h1,
h2 {
line-height: 1.3;
}
/* Makes the ul list marker smaller */
.marker-style--small li::marker {
font-size: var(--fs-marker);
}
/* list indent */
.list-indent li {
padding-left: 1rem;
}
.container {
padding-inline: 2rem;
}
.recipe {
max-width: 46rem;
background-color: var(--clr--white);
}
.recipe-intro__title {
font-family: var(--ff-young-serif);
font-size: var(--fs-main-headline-smaller);
font-weight: var(--fw-400);
color: var(--clr-drk-charcoal);
margin: 2rem 0 1rem;
}
.recipe-intro__img {
border-radius: 0;
}
/* Match the code to desktop and mobile design differences in margin and rounded corners etc */
@media screen and (min-width: 46rem) {
.container {
padding-inline: 0;
}
.recipe {
margin: 6rem;
border-radius: 1rem;
padding: 2rem;
}
.recipe-intro__title {
font-size: var(--fs-main-headline);
}
.recipe-intro__img {
border-radius: 1rem;
}
.recipe-nutrition {
padding-bottom: 0;
}
.recipe-ingredients__title,
.recipe-instructions__title,
.recipe-nutrition__title {
font-size: var(--fs-subheading);
}
}
.recipe-prep {
background-color: var(--clr-rose-white);
border-radius: 1rem;
padding: 1.5rem;
margin: 1.5rem 0;
}
.recipe-prep__title {
color: var(--clr-drk-raspberry);
font-size: var(--fs-small-heading);
padding-bottom: 0.5rem;
}
.recipe-prep__list li::marker {
color: var(--clr-drk-raspberry);
}
.recipe-prep__list li:not(:last-child) {
padding-bottom: 0.5rem;
}
/* Potentially could use extra global/utility classes for the repetitive styles/multiple selectors */
.recipe-ingredients__title,
.recipe-instructions__title,
.recipe-nutrition__title {
font-family: var(--ff-young-serif);
font-weight: var(--fw-400);
color: var(--clr-nutmeg);
}
.recipe-ingredients,
.recipe-instructions {
border-bottom: 1px solid var(--clr-lgt-grey);
}
.recipe-ingredients__list,
.recipe-instructions__list {
margin: 1.5rem 0;
}
.recipe-ingredients__list li,
.recipe-instructions__list li {
padding-block: 0.3rem;
}
.recipe-ingredients__list li::marker,
.recipe-instructions__list li::marker {
color: var(--clr-nutmeg);
}
.recipe-instructions,
.recipe-nutrition__title {
padding: 1.5rem 0 0.5rem;
}
.recipe-instructions__list li::marker {
font-weight: var(--fw-700);
}
.recipe-nutrition {
padding-bottom: 2rem;
}
.recipe-nutrition__title {
padding-bottom: 1rem;
}
/* This is the newish CSS & nesting selector */
.recipe-nutrition__table {
border-collapse: collapse;
width: 100%;
text-align: left;
margin-top: 2rem;
& th {
font-weight: var(--fw-400);
}
& tr:not(:last-of-type) {
border-bottom: 1px solid #dddddd;
}
& td {
font-weight: var(--fw-700);
color: var(--clr-nutmeg);
}
& th,
& td {
padding: 0.5em 1.5em;
}
}