0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00

Fix missing active state for outline buttons

Resolves #39085
This commit is contained in:
Theodore Brown 2023-08-23 10:24:43 -05:00
parent cacbdc680e
commit 40f92fa238
2 changed files with 17 additions and 5 deletions

View File

@ -156,7 +156,19 @@
@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include button-outline-variant($value);
@if $color == "light" {
@include button-outline-variant(
$value,
$active-background: shade-color($value, $btn-active-bg-shade-amount)
);
} @else if $color == "dark" {
@include button-outline-variant(
$value,
$active-background: tint-color($value, $btn-active-bg-tint-amount)
);
} @else {
@include button-outline-variant($value);
}
}
}
// scss-docs-end btn-variant-loops

View File

@ -39,15 +39,15 @@
@mixin button-outline-variant(
$color,
$color-hover: color-contrast($color),
$active-background: $color,
$active-border: $color,
$active-background: if($color-hover == $color-contrast-light, shade-color($color, $btn-active-bg-shade-amount), tint-color($color, $btn-active-bg-tint-amount)),
$active-border: $active-background,
$active-color: color-contrast($active-background)
) {
--#{$prefix}btn-color: #{$color};
--#{$prefix}btn-border-color: #{$color};
--#{$prefix}btn-hover-color: #{$color-hover};
--#{$prefix}btn-hover-bg: #{$active-background};
--#{$prefix}btn-hover-border-color: #{$active-border};
--#{$prefix}btn-hover-bg: #{$color};
--#{$prefix}btn-hover-border-color: #{$color};
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb($color)};
--#{$prefix}btn-active-color: #{$active-color};
--#{$prefix}btn-active-bg: #{$active-background};