-
Notifications
You must be signed in to change notification settings - Fork 555
/
style.css
253 lines (216 loc) · 4.42 KB
/
style.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
:root {
--clr-primary-400: 263 55% 52%;
--clr-secondary-400: 217 19% 35%;
--clr-secondary-500: 219 29% 14%;
--clr-neutral-100: 0 0% 100%;
--clr-neutral-200: 210 46% 95%;
--clr-neutral-300: 0 0% 81%;
--ff-primary: "Barlow Semi Condensed", sans-serif;
--fw-400: 500;
--fw-700: 600;
--fs-300: 0.6875rem;
--fs-400: 0.8125rem;
--fs-500: 1.25rem;
}
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
margin: 0;
}
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
list-style: none;
}
/* Set core root defaults */
html:focus-within {
scroll-behavior: smooth;
}
/* Set core body defaults */
body {
min-height: 100vh;
text-rendering: optimizeSpeed;
line-height: 1.5;
}
/* A elements that don't have a class get default styles */
a:not([class]) {
text-decoration-skip-ink: auto;
}
/* Make images easier to work with */
img,
picture {
max-width: 100%;
display: block;
}
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
}
/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
html:focus-within {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
body {
display: grid;
place-content: center;
min-height: 100vh;
font-family: var(--ff-primary);
font-weight: var(--fw-400);
background-color: hsl(var(--clr-neutral-200));
}
h1,
h2,
h3 {
font-weight: var(--fw-700);
}
/* utilities */
.flex {
display: flex;
gap: var(--gap, 1rem);
}
.flow > *:where(:not(:first-child)) {
margin-top: var(--flow-spacer, 1em);
}
.bg-primary-400 {
background: hsl(var(--clr-primary-400));
}
.bg-secondary-400 {
background: hsl(var(--clr-secondary-400));
}
.bg-secondary-500 {
background: hsl(var(--clr-secondary-500));
}
.bg-neutral-100 {
background: hsl(var(--clr-neutral-100));
}
.text-neutral-100 {
color: hsl(var(--clr-neutral-100));
}
.text-secondary-400 {
color: hsl(var(--clr-secondary-400));
}
.border-primary-400 {
border: 2px solid #a775f1;
}
/* components */
.testimonial-grid {
display: grid;
gap: 1.5rem;
grid-auto-columns: 1fr;
grid-template-areas:
'one'
'two'
'three'
'four'
'five';
padding-block: 2rem;
width: min(95%, 70rem);
margin-inline: auto;
}
.testimonial {
font-size: var(--fs-400);
padding: 2rem;
border-radius: 0.5rem;
box-shadow: 2.5rem 3.75rem 3rem -3rem hsl(var(--clr-secondary-400) / 0.25);
}
.testimonial:nth-child(1) {
grid-area: one;
}
.testimonial:nth-child(2) {
grid-area: two;
}
.testimonial:nth-child(3) {
grid-area: three;
}
.testimonial:nth-child(4) {
grid-area: four;
}
.testimonial:nth-child(5) {
grid-area: five;
}
@media screen and (min-width: 33em) {
.testimonial-grid {
grid-template-areas:
"one one"
"two three"
"five five"
"four four";
}
}
@media screen and (min-width: 38em) {
.testimonial-grid {
grid-template-areas:
'one one'
'two five'
'three five'
'four four';
}
}
@media screen and (min-width: 54em) {
.testimonial-grid {
grid-template-areas:
"one one two"
"five five five"
"three four four";
}
}
@media screen and (min-width: 75em) {
.testimonial-grid {
grid-template-areas:
"one one two five"
"three four four five";
}
}
.testimonial.quote {
background-image: url("./images/bg-pattern-quotation.svg");
background-repeat: no-repeat;
background-position: top right 10%;
}
.testimonial img {
width: 1.75rem;
aspect-ratio: 1;
border-radius: 50%;
}
.testimonial .name {
font-size: var(--fs-400);
font-weight: var(--fw-400);
line-height: 1;
}
.testimonial .position {
font-size: var(--fs-300);
opacity: 0.5;
}
.testimonial > p:first-of-type {
font-size: var(--fs-500);
line-height: 1.2;
}
.testimonial > p:last-of-type {
opacity: 0.7;
}