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

First try on color-mix

This commit is contained in:
Louis-Maxime Piton
2024-02-28 18:42:20 +01:00
parent b61117df78
commit 2fee900824
5 changed files with 11 additions and 43 deletions

View File

@@ -7,13 +7,13 @@
@mixin button-variant(
$background,
$border,
$color: color-contrast($background),
$hover-background: if($color == $color-contrast-light, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)),
$hover-border: if($color == $color-contrast-light, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)),
$hover-color: color-contrast($hover-background),
$active-background: if($color == $color-contrast-light, shade-color($background, $btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
$active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
$active-color: color-contrast($active-background),
$color,
$hover-background: color-mix(in srgb, $background 85%, var(--#{$prefix}body-color)),
$hover-border: color-mix(in srgb, $background 85%, var(--#{$prefix}body-color)),
$hover-color: $color,
$active-background: color-mix(in srgb, $background 70%, var(--#{$prefix}body-color)),
$active-border: color-mix(in srgb, $background 70%, var(--#{$prefix}body-color)),
$active-color: $color,
$disabled-background: $background,
$disabled-border: $border,
$disabled-color: $color