Sha256: 7b311cdc9cab5f1b86fc63725f37b281431f5da824d3044b841e2b5131e98ed4

Contents?: true

Size: 1.65 KB

Versions: 2

Compression:

Stored size: 1.65 KB

Contents

.floating-label {
  @include floating-label-size($textfield-font-size, $textfield-height, $textfield-line-height, $textfield-padding-y);

  padding-top: $floating-label-font-size-focus;
  position: relative;

  &.has-value > label,
  &.is-focused > label {
    line-height: 1;
    top: 0;
  }

  &.is-focused > label {
    color: $floating-label-color-focus;
  }

  &:not(.has-value):not(.is-focused) > .form-control {
    &[type='date'],
    &[type='datetime-local'],
    &[type='time'] {
      color: transparent;
    }
  }

  > label {
    @include text-truncate;
    @include transition-standard(color, top, transform);

    color: $floating-label-color;
    display: block;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    transform-origin: 0 0;
  }

  > .form-control {
    position: relative;

    &[type='file']::-webkit-file-upload-button {
      background-color: transparent;
      background-image: none;
      border: 0;
      color: $floating-label-color;
      height: auto;
      padding: 0;
    }

    &:focus {
      &::placeholder {
        color: $textfield-hint-color;
        opacity: 1;
      }
    }

    &::placeholder {
      @include transition-standard(opacity);

      color: transparent;
      opacity: 0;
    }
  }
}

.floating-label-lg {
  @include floating-label-size($textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-padding-y-lg);

  > .form-control {
    @extend %form-control-lg;
  }
}

.floating-label-sm {
  @include floating-label-size($textfield-font-size-sm, $textfield-height-sm, $textfield-line-height-sm, $textfield-padding-y-sm);

  > .form-control {
    @extend %form-control-sm;
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
material-sass-4.0.0.beta3 assets/stylesheets/material/material/_text-field-floating-label.scss
material-sass-4.0.0.beta2 assets/stylesheets/material/material/_text-field-floating-label.scss