<commit_before>// scss-lint:disable VariableForProperty
// Disable linter because we're passing in the color as a variable, so we need
// to call the get-darker/lighter functions dynamically instead of with set vars

// mixin to create buttons
@mixin btn($color: $primary-button-color, $txtcolor: $white, $height: $button-height, $hoverstate: false, $outlined: false) {
  @include btn-base($height);

  @if not $outlined {
    @include btn-color($color, $txtcolor, $hoverstate: $hoverstate);
  }
  @else {
    @include btn-outlined($color, $hoverstate: $hoverstate);
  }
}

// shared base for buttons
@mixin btn-base($height) {
  @include responsive-font('md', 1);

  min-height: $height;
  padding: 0 $button-padding;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: $button-border-radius;
  box-shadow: none;

  @include breakpoint($bp-md) {
    min-height: $button-height-lg;
    padding: 0 $button-padding-lg;
  }
}

// set the button color
@mixin btn-color($bgcolor, $txtcolor, $hoverstate: false) {
  color: $txtcolor;
  background-color: $bgcolor;
  border: 0;

  @if $hoverstate {
    &:active {
      background-color: get-darker($bgcolor);
    }

    @include breakpoint($bp-lg) {
      &:focus,
      &:hover {
        background: get-darker($bgcolor);
      }
    }
  }

  &[disabled] {
    @include btn-disabled($bgcolor);
  }
}

// set the outlined color
@mixin btn-outlined($color, $hoverstate: false) {
  color: $color;
  background-color: $white;
  border: 1px solid $color;

  @if $hoverstate {
    &:active {
      color: get-darker($color);
      border-color: get-darker($color);
    }

    @include breakpoint($bp-lg) {
      &:focus,
      &:hover {
        color: get-darker($color);
        border-color: get-darker($color);
      }
    }
  }

  &[disabled] {
    @include btn-disabled($color, $outlined: true);
  }
}

// set disabled color
@mixin btn-disabled($color, $outlined: false) {
  @if not $outlined {
    background-color: get-lighter($color);
  }
  @else {
    color: get-lighter($color);
    border-color: get-lighter($color);
  }
}

// unstyled button
@mixin unbutton($txtcolor: $link-color, $padding: $button-padding, $wrap: 'nowrap') {
  padding: 0 $padding;
  font-weight: normal;
  color: $txtcolor;
  text-align: center;
  background-color: $transparent-color;
  border: 0;
  border-radius: 0;
  box-shadow: none;

  @if ($wrap == 'nowrap') {
    white-space: nowrap;
  }

  &:hover {
    text-decoration: underline;
  }
}

// icon button
@mixin icon-button() {
  @include unbutton($padding: 0);

  line-height: 0;
}<commit_msg>CP-1836: Change 'wrap' to 'nowrap' for semantic accuracy when setting to false<commit_after>// scss-lint:disable VariableForProperty
// Disable linter because we're passing in the color as a variable, so we need
// to call the get-darker/lighter functions dynamically instead of with set vars

// mixin to create buttons
@mixin btn($color: $primary-button-color, $txtcolor: $white, $height: $button-height, $hoverstate: false, $outlined: false) {
  @include btn-base($height);

  @if not $outlined {
    @include btn-color($color, $txtcolor, $hoverstate: $hoverstate);
  }
  @else {
    @include btn-outlined($color, $hoverstate: $hoverstate);
  }
}

// shared base for buttons
@mixin btn-base($height) {
  @include responsive-font('md', 1);

  min-height: $height;
  padding: 0 $button-padding;
  font-weight: normal;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: $button-border-radius;
  box-shadow: none;

  @include breakpoint($bp-md) {
    min-height: $button-height-lg;
    padding: 0 $button-padding-lg;
  }
}

// set the button color
@mixin btn-color($bgcolor, $txtcolor, $hoverstate: false) {
  color: $txtcolor;
  background-color: $bgcolor;
  border: 0;

  @if $hoverstate {
    &:active {
      background-color: get-darker($bgcolor);
    }

    @include breakpoint($bp-lg) {
      &:focus,
      &:hover {
        background: get-darker($bgcolor);
      }
    }
  }

  &[disabled] {
    @include btn-disabled($bgcolor);
  }
}

// set the outlined color
@mixin btn-outlined($color, $hoverstate: false) {
  color: $color;
  background-color: $white;
  border: 1px solid $color;

  @if $hoverstate {
    &:active {
      color: get-darker($color);
      border-color: get-darker($color);
    }

    @include breakpoint($bp-lg) {
      &:focus,
      &:hover {
        color: get-darker($color);
        border-color: get-darker($color);
      }
    }
  }

  &[disabled] {
    @include btn-disabled($color, $outlined: true);
  }
}

// set disabled color
@mixin btn-disabled($color, $outlined: false) {
  @if not $outlined {
    background-color: get-lighter($color);
  }
  @else {
    color: get-lighter($color);
    border-color: get-lighter($color);
  }
}

// unstyled button
@mixin unbutton($txtcolor: $link-color, $padding: $button-padding, $nowrap: 'nowrap') {
  padding: 0 $padding;
  font-weight: normal;
  color: $txtcolor;
  text-align: center;
  background-color: $transparent-color;
  border: 0;
  border-radius: 0;
  box-shadow: none;

  @if ($nowrap == 'nowrap') {
    white-space: nowrap;
  }

  &:hover {
    text-decoration: underline;
  }
}

// icon button
@mixin icon-button() {
  @include unbutton($padding: 0);

  line-height: 0;
}
{'fraction_non_alphanumeric': 0.15689945703051864, 'fraction_numerical': 0.004493540535480247, 'mean_word_length': 3.2363203806502776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '753286', 'n_tokens_mistral': 1922, 'n_tokens_neox': 1863, 'n_words': 443}