<commit_before>// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

////
/// @group button-group
////

/// Margin for button groups.
/// @type Number
$buttongroup-margin: 1rem !default;

/// Margin between buttons in a button group.
/// @type Border
$buttongroup-spacing: 1px !default;

/// Selector for the buttons inside a button group.
/// @type String
$buttongroup-child-selector: '.button' !default;

/// Maximum number of buttons that can be in an even-width button group.
/// @type Number
$buttongroup-expand-max: 6 !default;

/// Add styles for a button group container.
/// @param {String} $child-selector [$buttongroup-child-selector] - Selector for the buttons inside a button group.
@mixin button-group(
  $child-selector: $buttongroup-child-selector
) {
  @include clearfix;
  margin-bottom: $buttongroup-margin;
  font-size: 0;
  &.tiny #{$child-selector}     { font-size: map-get($button-sizes, tiny); }
  &.small #{$child-selector}    { font-size: map-get($button-sizes, small); }
  &.large #{$child-selector}    { font-size: map-get($button-sizes, large); }

  #{$child-selector} {
    margin: 0;
    font-size: map-get($button-sizes, default);

    &:not(:last-child) {
      margin-right: $buttongroup-spacing;
    }
  }
}

/// Creates a full-width button group, making each button equal width.
/// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside a button group.
@mixin button-group-expand(
  $selector: $buttongroup-child-selector,
  $count: null
) {
  @if $count != null {
    @warn 'button-group-expand(): the $count property is no longer needed. This parameter will be removed in Foundation 6.2.';
  }

  margin-right: -$buttongroup-spacing;

  #{$selector} {
    @for $i from 2 through $buttongroup-expand-max {
      &:first-child:nth-last-child(#{$i}) {
        &, &:first-child:nth-last-child(#{$i}) ~ #{$selector} {
          display: inline-block;
          width: calc( #{percentage(1/$i)} - #{$buttongroup-spacing} );
          margin-right: $buttongroup-spacing;
        }
      }
    }
  }
}

/// Stacks the buttons in a button group.
/// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside the button group.
@mixin button-group-stack(
  $selector: $buttongroup-child-selector
) {
  #{$selector} {
    width: 100%;

    &:not(:last-child) {
      margin-right: $buttongroup-spacing;
    }
  }
}

/// Un-stacks the buttons in a button group.
/// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside the button group.
@mixin button-group-unstack(
  $selector: $buttongroup-child-selector
) {
  #{$selector} {
    width: auto;

    &:not(:last-child) {
      margin-right: $buttongroup-spacing;
    }
  }
}

@mixin foundation-button-group {
  .button-group {
    @include button-group;

    // Even-width Group
    &.expanded { @include button-group-expand; }

    // Colors
    @each $name, $color in $foundation-colors {
      @if $button-fill != hollow {
        &.#{$name} #{$buttongroup-child-selector} {
          @include button-style($color, auto, auto);
        }
      }
      @else {
        &.#{$name} #{$buttongroup-child-selector} {
          @include button-hollow;
          @include button-hollow-style($color);
        }
      }
    }
<commit_msg>don't print button groups sizes in mixin, keep in CSS output<commit_after>// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

////
/// @group button-group
////

/// Margin for button groups.
/// @type Number
$buttongroup-margin: 1rem !default;

/// Margin between buttons in a button group.
/// @type Border
$buttongroup-spacing: 1px !default;

/// Selector for the buttons inside a button group.
/// @type String
$buttongroup-child-selector: '.button' !default;

/// Maximum number of buttons that can be in an even-width button group.
/// @type Number
$buttongroup-expand-max: 6 !default;

/// Add styles for a button group container.
/// @param {String} $child-selector [$buttongroup-child-selector] - Selector for the buttons inside a button group.
@mixin button-group(
  $child-selector: $buttongroup-child-selector
) {
  @include clearfix;
  margin-bottom: $buttongroup-margin;
  font-size: 0;

  #{$child-selector} {
    margin: 0;
    font-size: map-get($button-sizes, default);

    &:not(:last-child) {
      margin-right: $buttongroup-spacing;
    }
  }
}

/// Creates a full-width button group, making each button equal width.
/// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside a button group.
@mixin button-group-expand(
  $selector: $buttongroup-child-selector,
  $count: null
) {
  @if $count != null {
    @warn 'button-group-expand(): the $count property is no longer needed. This parameter will be removed in Foundation 6.2.';
  }

  margin-right: -$buttongroup-spacing;

  #{$selector} {
    @for $i from 2 through $buttongroup-expand-max {
      &:first-child:nth-last-child(#{$i}) {
        &, &:first-child:nth-last-child(#{$i}) ~ #{$selector} {
          display: inline-block;
          width: calc( #{percentage(1/$i)} - #{$buttongroup-spacing} );
          margin-right: $buttongroup-spacing;
        }
      }
    }
  }
}

/// Stacks the buttons in a button group.
/// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside the button group.
@mixin button-group-stack(
  $selector: $buttongroup-child-selector
) {
  #{$selector} {
    width: 100%;

    &:not(:last-child) {
      margin-right: $buttongroup-spacing;
    }
  }
}

/// Un-stacks the buttons in a button group.
/// @param {String} $selector [$buttongroup-child-selector] - Selector for the buttons inside the button group.
@mixin button-group-unstack(
  $selector: $buttongroup-child-selector
) {
  #{$selector} {
    width: auto;

    &:not(:last-child) {
      margin-right: $buttongroup-spacing;
    }
  }
}

@mixin foundation-button-group {
  .button-group {
    @include button-group;

    // Sizes
    @each $size, $value in $button-sizes {
      &.#{$size} #{$buttongroup-child-selector} { font-size: $value; }
    }

    // Even-width Group
    &.expanded { @include button-group-expand; }

    // Colors
    @each $name, $color in $foundation-colors {
      @if $button-fill != hollow {
        &.#{$name} #{$buttongroup-child-selector} {
          @include button-style($color, auto, auto);
        }
      }
      @else {
        &.#{$name} #{$buttongroup-child-selector} {
          @include button-hollow;
          @include button-hollow-style($color);
        }
      }
    }

{'fraction_non_alphanumeric': 0.15648510382184772, 'fraction_numerical': 0.0036111947035811012, 'mean_word_length': 2.811353211009174, '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': '3203993', 'n_tokens_mistral': 2267, 'n_tokens_neox': 2183, 'n_words': 557}