1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-31 00:59:51 +02:00

Use WCAG contrast algo (#30168)

This commit is contained in:
Gaël Poupard
2020-03-23 18:03:56 +01:00
committed by GitHub
parent 2e150e722a
commit 03908ea37a
7 changed files with 155 additions and 116 deletions

View File

@@ -6,13 +6,13 @@
@mixin button-variant(
$background,
$border,
$color: color-yiq($background),
$color: color-contrast($background),
$hover-background: darken($background, 7.5%),
$hover-border: darken($border, 10%),
$hover-color: color-yiq($hover-background),
$hover-color: color-contrast($hover-background),
$active-background: darken($background, 10%),
$active-border: darken($border, 12.5%),
$active-color: color-yiq($active-background)
$active-color: color-contrast($active-background)
) {
color: $color;
@include gradient-bg($background);
@@ -69,10 +69,10 @@
@mixin button-outline-variant(
$color,
$color-hover: color-yiq($color),
$color-hover: color-contrast($color),
$active-background: $color,
$active-border: $color,
$active-color: color-yiq($active-background)
$active-color: color-contrast($active-background)
) {
color: $color;
border-color: $color;