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

Add color argument to button mixins (#29444)

Add optional `$color` argument to `button-variant()` and
`button-outline-variant()` for additional flexibility.
This commit is contained in:
Jeremy Jackson
2019-10-12 08:21:22 +00:00
committed by XhmikosR
parent b3451ff258
commit 4e37fc3ab4
2 changed files with 30 additions and 12 deletions

View File

@@ -37,6 +37,8 @@ Changes to our source Sass files and compiled CSS.
- Dropped `color()`, `theme-color()` & `gray()` functions in favor of variables. [See #29083](https://github.com/twbs/bootstrap/pull/29083)
- The `theme-color-level()` function is renamed to `color-level()` and now accepts any color you want instead of only `$theme-color` colors. [See #29083](https://github.com/twbs/bootstrap/pull/29083)
- Line heights are dropped from several components to simplify our codebase. The `button-size()` and `pagination-size()` do not accept line height parameters anymore. [See #29271](https://github.com/twbs/bootstrap/pull/29271)
- The `button-variant()` mixin now accepts 3 optional color parameters, for each button state, to override the color provided by `color-yiq()`. By default, these parameters will find which color provides more contrast against the button state's background color with `color-yiq()`.
- The `button-outline-variant()` mixin now accepts an additional argument, `$active-color`, for setting the button's active state text color. By default, this parameter will find which color provides more contrast against the button's active background color with `color-yiq()`.
## JavaScript