Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier disabled state customization for button variants #30639

Merged
merged 7 commits into from
Jul 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions scss/mixins/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
}

Expand Down
4 changes: 4 additions & 0 deletions site/content/docs/5.0/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down