Skip to content

Commit d25db78

Browse files
committed
fix: missing touch target for swiper
1 parent 99882f7 commit d25db78

File tree

2 files changed

+56
-23
lines changed

2 files changed

+56
-23
lines changed

assets/scss/_fonts.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
1919
}
2020

21-
2221
/* Overpass Mono Variable (300-700) */
2322
@font-face {
2423
font-family: 'Overpass Mono';

assets/scss/components/_testimonials.scss

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,34 @@
115115
}
116116

117117
.swiper-pagination-bullet {
118-
width: 10px;
119-
height: 10px;
120-
background-color: $primary;
121-
opacity: 0.5;
118+
width: 48px;
119+
height: 48px;
120+
background-color: transparent;
121+
opacity: 1;
122122
transition: all 0.3s ease;
123-
/* Increase touch target for accessibility (WCAG 2.5.5) */
124-
padding: 19px;
125-
background-clip: content-box;
126-
/* Total touch target: 10px + (19px * 2) = 48x48px */
123+
position: relative;
124+
/* Total touch target: 48x48px for accessibility (WCAG 2.5.5) */
125+
126+
&::before {
127+
content: '';
128+
position: absolute;
129+
top: 50%;
130+
left: 50%;
131+
transform: translate(-50%, -50%);
132+
width: 12px;
133+
height: 12px;
134+
background-color: $primary;
135+
opacity: 0.5;
136+
border-radius: 50%;
137+
transition: all 0.3s ease;
138+
}
127139

128140
&-active {
129-
opacity: 1;
130-
width: 25px;
131-
border-radius: 5px;
141+
&::before {
142+
opacity: 1;
143+
width: 28px;
144+
border-radius: 5px;
145+
}
132146
}
133147
}
134148

@@ -197,6 +211,9 @@
197211
margin: 0 0;
198212
padding: clamp(1rem, 3vw, 2rem) 1rem;
199213
position: relative;
214+
display: flex;
215+
flex-direction: column;
216+
align-items: center;
200217
}
201218

202219
.testimonial-body {
@@ -213,6 +230,9 @@
213230
position: relative;
214231
padding-top: clamp(1.5rem, 4vw, 2rem);
215232
letter-spacing: 0.005em;
233+
min-height: clamp(10rem, 30vw, 15rem);
234+
display: flex;
235+
align-items: center;
216236

217237
p {
218238
margin-bottom: 0;
@@ -294,21 +314,35 @@
294314
}
295315

296316
.swiper-pagination-bullet {
297-
width: 0.625rem;
298-
height: 0.625rem;
299-
background-color: $primary;
300-
opacity: 0.3;
317+
width: 3rem;
318+
height: 3rem;
319+
background-color: transparent;
320+
opacity: 1;
301321
transition: all 0.3s ease;
302322
margin: 0 0.3125rem;
303-
/* Increase touch target for accessibility (WCAG 2.5.5) */
304-
padding: 1.1875rem;
305-
background-clip: content-box;
306-
/* Total touch target: 0.625rem (10px) + (1.1875rem * 2) = 3rem (48px) */
323+
position: relative;
324+
/* Total touch target: 3rem (48px) for accessibility (WCAG 2.5.5) */
325+
326+
&::before {
327+
content: '';
328+
position: absolute;
329+
top: 50%;
330+
left: 50%;
331+
transform: translate(-50%, -50%);
332+
width: 0.75rem;
333+
height: 0.75rem;
334+
background-color: $primary;
335+
opacity: 0.3;
336+
border-radius: 50%;
337+
transition: all 0.3s ease;
338+
}
307339

308340
&-active {
309-
opacity: 1;
310-
width: 1.875rem;
311-
border-radius: 0.3125rem;
341+
&::before {
342+
opacity: 1;
343+
width: 2rem;
344+
border-radius: 0.3125rem;
345+
}
312346
}
313347
}
314348

0 commit comments

Comments
 (0)