aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaĆ«l Poupard <[email protected]>2020-07-12 06:56:33 +0200
committerGitHub <[email protected]>2020-07-12 07:56:33 +0300
commit37ef4e4b5ef7406d10009539a44ab7a340a1fb98 (patch)
tree49c78693a93796c943a6c8da5f1014fbde6ba240
parenteeb73e0ccf9c9b1b4fae438ac65851b99bbe10a3 (diff)
downloadbootstrap-37ef4e4b5ef7406d10009539a44ab7a340a1fb98.tar.xz
bootstrap-37ef4e4b5ef7406d10009539a44ab7a340a1fb98.zip
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 <[email protected]> Co-authored-by: Mark Otto <[email protected]>
-rw-r--r--scss/mixins/_buttons.scss11
-rw-r--r--site/content/docs/5.0/migration.md4
2 files changed, 11 insertions, 4 deletions
diff --git a/scss/mixins/_buttons.scss b/scss/mixins/_buttons.scss
index 09ef0cb38..b72836fad 100644
--- a/scss/mixins/_buttons.scss
+++ b/scss/mixins/_buttons.scss
@@ -12,7 +12,10 @@
$hover-color: color-contrast($hover-background),
$active-background: darken($background, 10%),
$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;
@include gradient-bg($background);
@@ -61,11 +64,11 @@
&:disabled,
&.disabled {
- color: $color;
- background-color: $background;
+ color: $disabled-color;
+ background-color: $disabled-background;
// Remove CSS gradients if they're enabled
background-image: if($enable-gradients, none, null);
- border-color: $border;
+ border-color: $disabled-border;
}
}
diff --git a/site/content/docs/5.0/migration.md b/site/content/docs/5.0/migration.md
index 7525fc57f..093e99819 100644
--- a/site/content/docs/5.0/migration.md
+++ b/site/content/docs/5.0/migration.md
@@ -16,6 +16,10 @@ toc: true
### 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
- Renamed `whiteList` option to `allowList`