mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 18:54:30 +01:00
Easier disabled state customization for button variants (#30639)
* feat(buttons): easier disabled state customization * docs(migration): mention new arguments for disabled state in button-variant() * Update migration.md Co-authored-by: XhmikosR <xhmikosr@gmail.com> Co-authored-by: Mark Otto <markd.otto@gmail.com>
This commit is contained in:
parent
eeb73e0ccf
commit
37ef4e4b5e
@ -12,7 +12,10 @@
|
|||||||
$hover-color: color-contrast($hover-background),
|
$hover-color: color-contrast($hover-background),
|
||||||
$active-background: darken($background, 10%),
|
$active-background: darken($background, 10%),
|
||||||
$active-border: darken($border, 12.5%),
|
$active-border: darken($border, 12.5%),
|
||||||
$active-color: color-contrast($active-background)
|
$active-color: color-contrast($active-background),
|
||||||
|
$disabled-background: $background,
|
||||||
|
$disabled-border: $border,
|
||||||
|
$disabled-color: color-contrast($disabled-background)
|
||||||
) {
|
) {
|
||||||
color: $color;
|
color: $color;
|
||||||
@include gradient-bg($background);
|
@include gradient-bg($background);
|
||||||
@ -61,11 +64,11 @@
|
|||||||
|
|
||||||
&:disabled,
|
&:disabled,
|
||||||
&.disabled {
|
&.disabled {
|
||||||
color: $color;
|
color: $disabled-color;
|
||||||
background-color: $background;
|
background-color: $disabled-background;
|
||||||
// Remove CSS gradients if they're enabled
|
// Remove CSS gradients if they're enabled
|
||||||
background-image: if($enable-gradients, none, null);
|
background-image: if($enable-gradients, none, null);
|
||||||
border-color: $border;
|
border-color: $disabled-border;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,10 @@ toc: true
|
|||||||
|
|
||||||
### Components
|
### Components
|
||||||
|
|
||||||
|
#### Buttons
|
||||||
|
|
||||||
|
- Disabled states of buttons are easier to customize thanks to additional arguments in the `button-variant()` mixin. [See #30639.](https://github.com/twbs/bootstrap/pull/30639)
|
||||||
|
|
||||||
#### Popovers
|
#### Popovers
|
||||||
|
|
||||||
- Renamed `whiteList` option to `allowList`
|
- Renamed `whiteList` option to `allowList`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user