Button Variant mixin is not setting the hover/active background color correctly when used with white. #41853
-
|
Not sure if this is a bug in v5.3.7 or if we need to change the way we are using the button-variant mixin for our white button class. I didn't see any issues or discussions for it, but I could have overlooked one. This is how we have the class coded in our SCSS: Previously, the mixin would darken the color used for the base background for the hover/active background colors when we were using v4. However, after upgrading to the latest version, this is no longer the case. The text color is set appropriately, but the hover/active background color is set to Is this the expected behavior for the mixin now? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I think it's because button-variant uses the tint-color() function. If I understand the documentation correctly, you can also simply specify the :hover background. button-variant
|
Beta Was this translation helpful? Give feedback.
I think it's because button-variant uses the tint-color() function.
So ‘white’ is mixed with #fff. And that results in #fff.
If I understand the documentation correctly, you can also simply specify the :hover background.
https://getbootstrap.com/docs/5.3/components/buttons/#sass-mixins
button-variant