<commit_before>// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.

//
// Office UI Fabric
// --------------------------------------------------
// Toggle styles


@import '../Label/Label.scss';

// Slider mixin
@mixin ms-Toggle-slider($direction) {
  // Slider pseudo element
  &:before {
    position: absolute;
    display: block;
    box-sizing: content-box;
    content: '';
    top: -2.5px;
    #{$direction}: -2.5px;
    width: 12px;
    height: 20px;
    background-color: $ms-color-neutralSecondaryAlt;
    outline: 2px solid transparent;

    @media screen and (-ms-high-contrast: active) {
      border: 2.5px solid $ms-color-white;
      height: 15px;
      outline: 0;
    }

    @media screen and (-ms-high-contrast: black-on-white) {
      border-color: $ms-color-black;
    }
  }

  @if $direction == left {
    &:before {
      right: auto;
      border-right: 2.5px solid $ms-color-white;
    }
  }

  @if $direction == right {
    &:before {
      left: auto;
      border-left: 2.5px solid $ms-color-white;
    }
  }

  &:active {
    background-color: $ms-color-themePrimary;
  }
}

// Toggle
.ms-Toggle {
  @include ms-font-m;
  @include ms-u-normalize;
  position: relative;
  display: block;
  margin-bottom: 26px;

  // Action label (on/off) on the right of the toggle
  .ms-Label {
    position: relative;
    padding: 0 0 0 62px;
    font-size: $ms-font-size-s;
  }

  // 'Off' state - slider on the left
  & .ms-Toggle-field {
    background-color: $ms-color-neutralLighter;

    @include ms-Toggle-slider(left);

    // Show the off label / hide the on label
    .ms-Label--off {
      display: block;
    }

    .ms-Label--on {
      display: none;
    }
  }

  // 'On' state - slider on the right
  & .ms-Toggle-field.is-selected {
    background-color: $ms-color-themePrimary;

    @include ms-Toggle-slider(right);

    // Show the on label / hide the off label
    .ms-Label--off {
      display: none;
    }

    .ms-Label--on {
      display: block;
    }

    @media screen and (-ms-high-contrast: active) {
      background-color: $ms-color-white;
    }

    @media screen and (-ms-high-contrast: black-on-white) {
      background-color: $ms-color-black;
    }
  }

  &:focus,
  &:hover {
    & .ms-Toggle-field {
      background-color: $ms-color-neutralLight;
    }

    & .ms-Toggle-field.is-selected {
      background-color: $ms-color-themeDark;
    }

    .ms-Label {
      color: $ms-color-black;
    }
  }

  &:active {
    .ms-Label {
      color: $ms-color-neutralPrimary;
    }
  }

  // Disabled state
  &.is-disabled {
    .ms-Label {
     @include ms-Label-is-disabled;
    }

    .ms-Toggle-field {
      background-color: $ms-color-white;
      border-color: $ms-color-neutralTertiaryAlt;
      pointer-events: none;
      cursor: default;

      &:before {
        background-color: $ms-color-neutralTertiaryAlt;
      }
    }

    .ms-Toggle-field,
    .ms-Toggle-field:before {
      @media screen and (-ms-high-contrast: active) {
        border-color: $ms-color-contrastBlackDisabled;
      }

      @media screen and (-ms-high-contrast: black-on-white) {
        border-color: $ms-color-contrastWhiteDisabled;
      }
    }
  }
}

// Description text
.ms-Toggle-description {
  position: relative;
  font-size: $ms-font-size-s;
  vertical-align: top;
  display: block;
  margin-bottom: 8px;
}

// Toggle input field
.ms-Toggle-field {
  position: relative;
  display: inline-block;
  width: 57px;
  height: 20px;
  box-sizing: border-box;
  border: 2.5px $ms-color-neutralTertiaryAlt solid;
  cursor: pointer;
}

// On/Off slide states
.ms-Toggle-input {
  position: absolute;
  opacity: 0;
  top: 0;
}

//== Modifier: Toggle with description text left
//
.ms-Toggle.ms-Toggle--textLeft {
  width: 225px;
  margin-bottom: 40px;

  .ms-Toggle-description {
    display: inline-block;
    max-width: 150px;
    top: -3px;
    margin-bottom: 0;
  }

  .ms-Toggle-field {
    float: right;
  }
}
<commit_msg>Put pseudo selectors for hover, focus, active on ms-Toggle-field, remove from ms-Toggle<commit_after>// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information.

//
// Office UI Fabric
// --------------------------------------------------
// Toggle styles


@import '../Label/Label.scss';

// Slider mixin
@mixin ms-Toggle-slider($direction) {
  // Slider pseudo element
  &:before {
    position: absolute;
    display: block;
    box-sizing: content-box;
    content: '';
    top: -2.5px;
    #{$direction}: -2.5px;
    width: 12px;
    height: 20px;
    background-color: $ms-color-neutralSecondaryAlt;
    outline: 2px solid transparent;

    @media screen and (-ms-high-contrast: active) {
      border: 2.5px solid $ms-color-white;
      height: 15px;
      outline: 0;
    }

    @media screen and (-ms-high-contrast: black-on-white) {
      border-color: $ms-color-black;
    }
  }

  @if $direction == left {
    &:before {
      right: auto;
      border-right: 2.5px solid $ms-color-white;
    }
  }

  @if $direction == right {
    &:before {
      left: auto;
      border-left: 2.5px solid $ms-color-white;
    }
  }

  &:active {
    background-color: $ms-color-themePrimary;
  }
}

// Toggle
.ms-Toggle {
  @include ms-font-m;
  @include ms-u-normalize;
  position: relative;
  display: block;
  margin-bottom: 26px;

  // Action label (on/off) on the right of the toggle
  .ms-Label {
    position: relative;
    padding: 0 0 0 62px;
    font-size: $ms-font-size-s;
  }

  // 'Off' state - slider on the left
  & .ms-Toggle-field {
    background-color: $ms-color-neutralLighter;

    @include ms-Toggle-slider(left);

    // Show the off label / hide the on label
    .ms-Label--off {
      display: block;
    }

    .ms-Label--on {
      display: none;
    }
  }

  // 'On' state - slider on the right
  & .ms-Toggle-field.is-selected {
    background-color: $ms-color-themePrimary;

    @include ms-Toggle-slider(right);

    // Show the on label / hide the off label
    .ms-Label--off {
      display: none;
    }

    .ms-Label--on {
      display: block;
    }

    @media screen and (-ms-high-contrast: active) {
      background-color: $ms-color-white;
    }

    @media screen and (-ms-high-contrast: black-on-white) {
      background-color: $ms-color-black;
    }
  }

  .ms-Toggle-field {
    &:focus,
    &:hover {
      background-color: $ms-color-neutralLight;
    }

    &.is-selected {
      background-color: $ms-color-themeDark;
    }

    .ms-Label {
      color: $ms-color-black;
    }

    &:active {
      .ms-Label {
        color: $ms-color-neutralPrimary;
      }
    }
  }

  // Disabled state
  &.is-disabled {
    .ms-Label {
     @include ms-Label-is-disabled;
    }

    .ms-Toggle-field {
      background-color: $ms-color-white;
      border-color: $ms-color-neutralTertiaryAlt;
      pointer-events: none;
      cursor: default;

      &:before {
        background-color: $ms-color-neutralTertiaryAlt;
      }
    }

    .ms-Toggle-field,
    .ms-Toggle-field:before {
      @media screen and (-ms-high-contrast: active) {
        border-color: $ms-color-contrastBlackDisabled;
      }

      @media screen and (-ms-high-contrast: black-on-white) {
        border-color: $ms-color-contrastWhiteDisabled;
      }
    }
  }
}

// Description text
.ms-Toggle-description {
  position: relative;
  font-size: $ms-font-size-s;
  vertical-align: top;
  display: block;
  margin-bottom: 8px;
}

// Toggle input field
.ms-Toggle-field {
  position: relative;
  display: inline-block;
  width: 57px;
  height: 20px;
  box-sizing: border-box;
  border: 2.5px $ms-color-neutralTertiaryAlt solid;
  cursor: pointer;
}

// On/Off slide states
.ms-Toggle-input {
  position: absolute;
  opacity: 0;
  top: 0;
}

//== Modifier: Toggle with description text left
//
.ms-Toggle.ms-Toggle--textLeft {
  width: 225px;
  margin-bottom: 40px;

  .ms-Toggle-description {
    display: inline-block;
    max-width: 150px;
    top: -3px;
    margin-bottom: 0;
  }

  .ms-Toggle-field {
    float: right;
  }
}

{'fraction_non_alphanumeric': 0.1539968172358918, 'fraction_numerical': 0.010772432366262701, 'mean_word_length': 2.1326687116564416, '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': '2866912', 'n_tokens_mistral': 2979, 'n_tokens_neox': 2812, 'n_words': 631}