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

////
/// @group menu
////

/// Margin of a menu.
/// @type Number
$menu-margin: 0 !default;

/// Left-hand margin of a nested menu.
/// @type Number
$menu-nested-margin: 1rem !default;

/// Padding for items in a pill menu.
/// @type Number
$menu-pills-padding: $global-menu-padding !default;

/// margin for items in a simple menu.
/// @type Number
$menu-simple-margin: 1rem !default;

/// Text color of an active menu item.
/// @type Color
$menu-item-color-active: $white !default;

/// Background color of an active menu item.
/// @type Color
$menu-item-background-active: get-color(primary) !default;

/// Spacing between an icon and text in a menu item.
/// @type Number
$menu-icon-spacing: 0.25rem !default;

/// Background color for an hovered menu item.
/// @type Color
$menu-item-background-hover: $light-gray !default;

/// Creates the base styles for a Menu.
@mixin menu-base {
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;

  @if $global-flexbox {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
  }

  li {
    @include disable-mouse-outline;
  }

  a {
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }

  // Reset styles of inner elements
  input,
  select,
  a,
  button {
    margin-bottom: 0;
  }
}

/// Expands the items of a Menu, so each item is the same width.
@mixin menu-expand {
  @if $global-flexbox {
    li {
      flex: 1 1 0px; // sass-lint:disable-line zero-unit
    }
  }
  @else {
    display: table;
    width: 100%;

    > li {
      display: table-cell;
      vertical-align: middle;
    }
  }
}

/// Align menu items.
@mixin menu-align($alignment) {
  @if $alignment == center {
    @if $global-flexbox {
      li {
        justify-content: center;
      }
    }
    @else {
      text-align: center;

      li {
        text-align: $global-left;
      }
    }
  }
  @else if $alignment == right {
    @if $global-flexbox {
      justify-content: flex-end;
    }
    @else {
      text-align: $global-right;

      li {
        text-align: $global-left;
      }
    }
  }
}

/// Sets the direction of a Menu.
/// @param {Keyword} $dir [horizontal] - Direction of the Menu. Can be `horizontal` or `vertical`.
@mixin menu-direction($dir: horizontal) {
  @if $dir == horizontal {
    @if $global-flexbox {
      flex-wrap: nowrap;

      li {
        flex: 0 0 auto;
      }
    }
    @else {
      li {
        display: inline-block;
      }

      a {
        display: inline-block;
      }
    }
  }
  @else if $dir == vertical {
    @if $global-flexbox {
      flex-wrap: wrap;

      li {
        flex: 0 0 100%;
        max-width: 100%;
      }

      a {
        justify-content: flex-start;
        align-items: flex-start;
      }
    }
    @else {
      li {
        display: block;
      }

      a {
        display: block;
      }
    }
  }
  @else {
    @warn 'The direction used for menu-direction() must be horizontal or vertical.';
  }
}

/// Creates a simple Menu, which has no padding or hover state.
/// @param {Keyword} $dir [$global-left] - Direction of the menu. This effects the side of the <li> that receives the margin.
/// @param {Number} $margin [$menu-simple-margin] - The margin to apply to each <li>.
@mixin menu-simple($dir: $global-left, $margin: $menu-simple-margin) {
  li + li {
    margin-#{$dir}: $margin;
  }
}

/// Creates a simple padded Menu.
/// @param {Number} $padding [$menu-pills-padding] - Padding of each menu item.
@mixin menu-pills($padding: $menu-pills-padding) {
  a {
    padding: $padding;
  }
}

/// Adds styles for a nested Menu, by adding `margin-left` to the menu.
/// @param {Keyword|Number} $padding [auto] - Length of the margin.
@mixin menu-nested($margin: $menu-nested-margin) {
  margin-#{$global-left}: $margin;
}

/// Adds basic styles for icons in menus.
@mixin menu-icons() {
  @if $global-flexbox {
    a {
      display: flex;
    }
  }
  @else {
    img,
    i,
    svg {
      vertical-align: middle;

      + span {
        vertical-align: middle;
      }
    }
  }
}

/// Adds position classes for icons within a menu.
@mixin menu-icon-position($position: left, $spacing: $menu-icon-spacing) {
  @if $position == left {
    li a {
      @if $global-flexbox {
        flex-flow: row nowrap;
      }

      img,
      i,
      svg {
        margin-#{$global-right}: $spacing;

        @if not $global-flexbox {
          display: inline-block;
        }
      }
    }
  }
  @else if $position == right {
    li a {
      @if $global-flexbox {
        flex-flow: row nowrap;
      }

      img,
      i,
      svg {
        margin-#{$global-left}: $spacing;

        @if not $global-flexbox {
          display: inline-block;
        }
      }
    }
  }
  @else if $position == top {
    li a {
      @if $global-flexbox {
        flex-flow: column nowrap;
      }
      @else {
        text-align: center;
      }

      img,
      i,
      svg {
        @if not $global-flexbox {
          display: block;
          margin: 0 auto $spacing;
        }
        @else {
          align-self: stretch;
          margin-bottom: $spacing;
          text-align: center;
        }
      }
    }
  }
  @else if $position == bottom {
    li a {
      @if $global-flexbox {
        flex-flow: column nowrap;
      }
      @else {
        text-align: center;
      }

      img,
      i,
      svg {
        @if not $global-flexbox {
          display: block;
          margin: $spacing auto 0;
        }
        @else {
          align-self: stretch;
          margin-bottom: $spacing;
          text-align: center;
        }
      }
    }
  }
}

@mixin menu-text {
  padding: $global-menu-padding;
  padding-top: 0;
  padding-bottom: 0;

  font-weight: bold;
  line-height: 1;
  color: inherit;
}

@mixin foundation-menu {
  .menu {
    @include menu-base;

    // Default orientation: horizontal
    &, &.horizontal {
      @include menu-direction(horizontal);
    }

    // Vertical orientation modifier
    &.vertical {
      @include menu-direction(vertical);
    }

    @include -zf-each-breakpoint($small: false) {
      &.#{$-zf-size}-vertical {
        @include menu-direction(vertical);
      }

      &.#{$-zf-size}-horizontal {
        @include menu-direction(horizontal);
      }
    }

    // Simple
    &.simple:not(.vertical) {
      @include menu-simple;
    }

    // Vertical simple
    &.vertical.simple {
      @include menu-simple(top);
    }

    // Pills
    &.pills {
      @include menu-pills;
    }

    // Even-width modifier for horizontal orientation
    &.expanded {
      @include menu-expand;
    }

    // Responsive expanded
    @include -zf-each-breakpoint($small: false) {
      &.#{$-zf-size}-expanded {
        @include menu-expand;
      }
    }

    // Nesting
    &.nested {
      @include menu-nested;
    }

    // Icon Base Styles
    &.icons {
      @include menu-icons;
    }

    // Icon Left
    &.icon-left {
      @include menu-icon-position(left);
    }

    // Icon Right
    &.icon-right {
      @include menu-icon-position(right);
    }

    // Icon Top
    &.icon-top {
      @include menu-icon-position(top);
    }

    // Icon Bottom
    &.icon-bottom {
      @include menu-icon-position(bottom);
    }

    // Active state
    .active > a {
      background: $menu-item-background-active;
      color: $menu-item-color-active;
    }

    // Align center
    &.align-center {
      @include menu-align(center);
    }

    // Align right
    &.align-#{$global-right} {
      @include menu-align(right);
    }

    .menu-text {
      @include menu-text;
    }
  }

  // Prevent FOUC when using the Responsive Menu plugin
  .no-js [data-responsive-menu] ul {
    display: none;
  }
}
<commit_msg>Add `display: block` on <a> elements by default, and remove from direction mixin.<commit_after>// Foundation for Sites by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

////
/// @group menu
////

/// Margin of a menu.
/// @type Number
$menu-margin: 0 !default;

/// Left-hand margin of a nested menu.
/// @type Number
$menu-nested-margin: 1rem !default;

/// Padding for items in a pill menu.
/// @type Number
$menu-pills-padding: $global-menu-padding !default;

/// margin for items in a simple menu.
/// @type Number
$menu-simple-margin: 1rem !default;

/// Text color of an active menu item.
/// @type Color
$menu-item-color-active: $white !default;

/// Background color of an active menu item.
/// @type Color
$menu-item-background-active: get-color(primary) !default;

/// Spacing between an icon and text in a menu item.
/// @type Number
$menu-icon-spacing: 0.25rem !default;

/// Background color for an hovered menu item.
/// @type Color
$menu-item-background-hover: $light-gray !default;

/// Creates the base styles for a Menu.
@mixin menu-base {
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;

  @if $global-flexbox {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
  }

  li {
    @include disable-mouse-outline;
  }

  a {
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    @if not $global-flexbox {
      display: block;
    }
  }

  // Reset styles of inner elements
  input,
  select,
  a,
  button {
    margin-bottom: 0;
  }
}

/// Expands the items of a Menu, so each item is the same width.
@mixin menu-expand {
  @if $global-flexbox {
    li {
      flex: 1 1 0px; // sass-lint:disable-line zero-unit
    }
  }
  @else {
    display: table;
    width: 100%;

    > li {
      display: table-cell;
      vertical-align: middle;
    }
  }
}

/// Align menu items.
@mixin menu-align($alignment) {
  @if $alignment == center {
    @if $global-flexbox {
      li {
        justify-content: center;
      }
    }
    @else {
      text-align: center;

      li {
        text-align: $global-left;
      }
    }
  }
  @else if $alignment == right {
    @if $global-flexbox {
      justify-content: flex-end;
    }
    @else {
      text-align: $global-right;

      li {
        text-align: $global-left;
      }
    }
  }
}

/// Sets the direction of a Menu.
/// @param {Keyword} $dir [horizontal] - Direction of the Menu. Can be `horizontal` or `vertical`.
@mixin menu-direction($dir: horizontal) {
  @if $dir == horizontal {
    @if $global-flexbox {
      flex-wrap: nowrap;

      li {
        flex: 0 0 auto;
      }
    }
    @else {
      li {
        display: inline-block;
      }
    }
  }
  @else if $dir == vertical {
    @if $global-flexbox {
      flex-wrap: wrap;

      li {
        flex: 0 0 100%;
        max-width: 100%;
      }

      a {
        justify-content: flex-start;
        align-items: flex-start;
      }
    }
    @else {
      li {
        display: block;
      }
    }
  }
  @else {
    @warn 'The direction used for menu-direction() must be horizontal or vertical.';
  }
}

/// Creates a simple Menu, which has no padding or hover state.
/// @param {Keyword} $dir [$global-left] - Direction of the menu. This effects the side of the <li> that receives the margin.
/// @param {Number} $margin [$menu-simple-margin] - The margin to apply to each <li>.
@mixin menu-simple($dir: $global-left, $margin: $menu-simple-margin) {
  li + li {
    margin-#{$dir}: $margin;
  }
}

/// Creates a simple padded Menu.
/// @param {Number} $padding [$menu-pills-padding] - Padding of each menu item.
@mixin menu-pills($padding: $menu-pills-padding) {
  a {
    padding: $padding;
  }
}

/// Adds styles for a nested Menu, by adding `margin-left` to the menu.
/// @param {Keyword|Number} $padding [auto] - Length of the margin.
@mixin menu-nested($margin: $menu-nested-margin) {
  margin-#{$global-left}: $margin;
}

/// Adds basic styles for icons in menus.
@mixin menu-icons() {
  @if $global-flexbox {
    a {
      display: flex;
    }
  }
  @else {
    img,
    i,
    svg {
      vertical-align: middle;

      + span {
        vertical-align: middle;
      }
    }
  }
}

/// Adds position classes for icons within a menu.
@mixin menu-icon-position($position: left, $spacing: $menu-icon-spacing) {
  @if $position == left {
    li a {
      @if $global-flexbox {
        flex-flow: row nowrap;
      }

      img,
      i,
      svg {
        margin-#{$global-right}: $spacing;

        @if not $global-flexbox {
          display: inline-block;
        }
      }
    }
  }
  @else if $position == right {
    li a {
      @if $global-flexbox {
        flex-flow: row nowrap;
      }

      img,
      i,
      svg {
        margin-#{$global-left}: $spacing;

        @if not $global-flexbox {
          display: inline-block;
        }
      }
    }
  }
  @else if $position == top {
    li a {
      @if $global-flexbox {
        flex-flow: column nowrap;
      }
      @else {
        text-align: center;
      }

      img,
      i,
      svg {
        @if not $global-flexbox {
          display: block;
          margin: 0 auto $spacing;
        }
        @else {
          align-self: stretch;
          margin-bottom: $spacing;
          text-align: center;
        }
      }
    }
  }
  @else if $position == bottom {
    li a {
      @if $global-flexbox {
        flex-flow: column nowrap;
      }
      @else {
        text-align: center;
      }

      img,
      i,
      svg {
        @if not $global-flexbox {
          display: block;
          margin: $spacing auto 0;
        }
        @else {
          align-self: stretch;
          margin-bottom: $spacing;
          text-align: center;
        }
      }
    }
  }
}

@mixin menu-text {
  padding: $global-menu-padding;
  padding-top: 0;
  padding-bottom: 0;

  font-weight: bold;
  line-height: 1;
  color: inherit;
}

@mixin foundation-menu {
  .menu {
    @include menu-base;

    // Default orientation: horizontal
    &, &.horizontal {
      @include menu-direction(horizontal);
    }

    // Vertical orientation modifier
    &.vertical {
      @include menu-direction(vertical);
    }

    @include -zf-each-breakpoint($small: false) {
      &.#{$-zf-size}-vertical {
        @include menu-direction(vertical);
      }

      &.#{$-zf-size}-horizontal {
        @include menu-direction(horizontal);
      }
    }

    // Simple
    &.simple:not(.vertical) {
      @include menu-simple;
    }

    // Vertical simple
    &.vertical.simple {
      @include menu-simple(top);
    }

    // Pills
    &.pills {
      @include menu-pills;
    }

    // Even-width modifier for horizontal orientation
    &.expanded {
      @include menu-expand;
    }

    // Responsive expanded
    @include -zf-each-breakpoint($small: false) {
      &.#{$-zf-size}-expanded {
        @include menu-expand;
      }
    }

    // Nesting
    &.nested {
      @include menu-nested;
    }

    // Icon Base Styles
    &.icons {
      @include menu-icons;
    }

    // Icon Left
    &.icon-left {
      @include menu-icon-position(left);
    }

    // Icon Right
    &.icon-right {
      @include menu-icon-position(right);
    }

    // Icon Top
    &.icon-top {
      @include menu-icon-position(top);
    }

    // Icon Bottom
    &.icon-bottom {
      @include menu-icon-position(bottom);
    }

    // Active state
    .active > a {
      background: $menu-item-background-active;
      color: $menu-item-color-active;
    }

    // Align center
    &.align-center {
      @include menu-align(center);
    }

    // Align right
    &.align-#{$global-right} {
      @include menu-align(right);
    }

    .menu-text {
      @include menu-text;
    }
  }

  // Prevent FOUC when using the Responsive Menu plugin
  .no-js [data-responsive-menu] ul {
    display: none;
  }
}

{'fraction_non_alphanumeric': 0.14073838319541693, 'fraction_numerical': 0.004328453214513049, 'mean_word_length': 1.799536707056308, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, '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': '1652658', 'n_tokens_mistral': 5403, 'n_tokens_neox': 5195, 'n_words': 1361}