title: How to set custom button text color in Bootstrap 4 and Sass?
body: <p>I would like to create a new button style in Bootstrap 4 with a white (#fff) text color. Mixin <code>button-variant</code> automatically sets the text color based on the background color. How can I use this mixin and set the color at the same time, without modifying <code>_buttons.scss</code>?</p>
  
  <p><strong>custom.scss</strong></p>
  
  <pre><code>.my_button {
    @include button-variant(HOW TO SET TEXT COLOR TO WHITE?);
  }
  </code></pre>
  
  <p><strong>_buttons.scss</strong></p>
  
  <pre><code>@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
    color: color-yiq($background);
    @include gradient-bg($background);
    border-color: $border;
    @include box-shadow($btn-box-shadow);
  
    @include hover {
      color: color-yiq($hover-background);
      @include gradient-bg($hover-background);
      border-color: $hover-border;
    }
  </code></pre>