Skip to content

Commit

Permalink
Ensure catd text color persists when browser loses focus
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmason committed Apr 29, 2021
1 parent e10665b commit 5daf364
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/css/components/_c-card-resource.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@
border-left-color: $color-green-shade;
}

&:focus-within > * {
color: $color-white;
}


// User Queries
@media screen and (prefers-reduced-motion: reduce) {
transition: none;
}
}

// Color the author link when the title link is focused
.c-card-resource__title:focus,
.c-card-resource__title:focus ~ .c-card-resource__meta,
.c-card-resource__title:focus ~ .c-card-resource__description {
color: $color-white;
Expand Down
4 changes: 3 additions & 1 deletion src/css/components/_c-featured.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
background-color: $color-white;
}

&:focus-within {
&:focus-within,
&:focus-within * {
color: $color-white;
}

Expand Down Expand Up @@ -53,6 +54,7 @@


// Color the author link when the title link is focused
.c-featured__title:focus,
.c-featured__title:focus ~ .c-featured__meta,
.c-featured__title:focus ~ .c-featured__description {
color: $color-white;
Expand Down

0 comments on commit 5daf364

Please sign in to comment.