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:
@@ -23,7 +23,7 @@ $progress-bar-color: #fea230;
|
||||
}
|
||||
|
||||
.progress-meter-text {
|
||||
color: #000;
|
||||
color: color-pick-contrast($progress-bar-background);
|
||||
right: 12px;
|
||||
text-align: right;
|
||||
transform: translate(0%, -50%);
|
||||
@@ -120,7 +120,7 @@ $progress-bar-color: #fea230;
|
||||
.milestone-status {
|
||||
background: $budget;
|
||||
border-radius: rem-calc(4);
|
||||
color: #fff;
|
||||
color: color-pick-contrast($budget);
|
||||
display: inline-block;
|
||||
margin-top: $line-height / 6;
|
||||
padding: $line-height / 4 $line-height / 2;
|
||||
|
||||
Reference in New Issue
Block a user