Skip to content

Commit 5daf364

Browse files
committed
Ensure catd text color persists when browser loses focus
1 parent e10665b commit 5daf364

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/css/components/_c-card-resource.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,19 @@
2222
border-left-color: $color-green-shade;
2323
}
2424

25+
&:focus-within > * {
26+
color: $color-white;
27+
}
28+
29+
2530
// User Queries
2631
@media screen and (prefers-reduced-motion: reduce) {
2732
transition: none;
2833
}
2934
}
3035

3136
// Color the author link when the title link is focused
37+
.c-card-resource__title:focus,
3238
.c-card-resource__title:focus ~ .c-card-resource__meta,
3339
.c-card-resource__title:focus ~ .c-card-resource__description {
3440
color: $color-white;

src/css/components/_c-featured.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
background-color: $color-white;
1818
}
1919

20-
&:focus-within {
20+
&:focus-within,
21+
&:focus-within * {
2122
color: $color-white;
2223
}
2324

@@ -53,6 +54,7 @@
5354

5455

5556
// Color the author link when the title link is focused
57+
.c-featured__title:focus,
5658
.c-featured__title:focus ~ .c-featured__meta,
5759
.c-featured__title:focus ~ .c-featured__description {
5860
color: $color-white;

0 commit comments

Comments
 (0)