Use color-pick-contrast to get text colors

We were defining (for instance) white text against the `$brand`
background. That meant that, if somebody customized the `$brand` color
so it used a light color, they had to customize the text color as well
in order to guarantee proper contrast between text and background
colors.

So we're using `color-pick-contrast` instead, which means we don't have
to manually calculate whether white or black will be the color which
makes the text more readable.
This commit is contained in:
Javi Martín
2022-10-23 00:42:08 +02:00
parent 025d7bf9f8
commit 1b1b5b5755
12 changed files with 21 additions and 21 deletions

View File

@@ -88,7 +88,7 @@
&[aria-selected="true"],
&.is-active {
background: $dark;
color: $white;
color: color-pick-contrast($dark);
font-weight: normal;
}
@@ -100,7 +100,7 @@
&.current-phase-tab a {
background: $brand-secondary;
color: $white;
color: color-pick-contrast($brand-secondary);
padding-top: $line-height / 2;
&:hover {