twbs/bootstrap

Change button outline to work with lighter colours

Closed this issue · 0 comments

The mixin button-outline-variant currently has hardcoded values to make the colour of the text white. When using it with lighter colours (for example yellow on a dark themed website) the white is lost to the button background on hover / focus / active.

Instead I think there are 2 solutions to this:

  1. Change the mixin to accept a second parameter, $text. This will work in a very similar way to button-variant.

  2. Change the mixin to do a quick @if (lightness($color) > 50) { check and set it to fff or 000 as necessary.