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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user