Extract mixin to get a background with text contrast
This way we simplify the code a bit. Note we're only using this function when variables for background colors are already defined, since that means customizing the variable using the background color will automatically change the color of the text. Customization isn't easier when using raw colors.
This commit is contained in:
@@ -87,8 +87,7 @@
|
||||
|
||||
&[aria-selected="true"],
|
||||
&.is-active {
|
||||
background: $dark;
|
||||
color: color-pick-contrast($dark);
|
||||
@include background-with-text-contrast($dark);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@@ -99,8 +98,7 @@
|
||||
}
|
||||
|
||||
&.current-phase-tab a {
|
||||
background: $brand-secondary;
|
||||
color: color-pick-contrast($brand-secondary);
|
||||
@include background-with-text-contrast($brand-secondary);
|
||||
padding-top: $line-height / 2;
|
||||
|
||||
&:hover {
|
||||
|
||||
Reference in New Issue
Block a user