Sha256: e3ccbfbbbc9f16d1e1bfd7d48f4c948f005f2c67da0ffe54ecee11848071c4b2

Contents?: true

Size: 1.71 KB

Versions: 101

Compression:

Stored size: 1.71 KB

Contents

.form-floating {
  position: relative;

  > .form-control,
  > .form-select {
    height: $form-floating-height;
    line-height: $form-floating-line-height;
  }

  > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%; // allow textareas
    padding: $form-floating-padding-y $form-floating-padding-x;
    pointer-events: none;
    border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
    transform-origin: 0 0;
    @include transition($form-floating-transition);
  }

  // stylelint-disable no-duplicate-selectors
  > .form-control {
    padding: $form-floating-padding-y $form-floating-padding-x;

    &::placeholder {
      color: transparent;
    }

    &:focus,
    &:not(:placeholder-shown) {
      padding-top: $form-floating-input-padding-t;
      padding-bottom: $form-floating-input-padding-b;
    }
    // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
    &:-webkit-autofill {
      padding-top: $form-floating-input-padding-t;
      padding-bottom: $form-floating-input-padding-b;
    }
  }

  > .form-select {
    padding-top: $form-floating-input-padding-t;
    padding-bottom: $form-floating-input-padding-b;
  }

  > .form-control:focus,
  > .form-control:not(:placeholder-shown),
  > .form-select {
    ~ label {
      opacity: $form-floating-label-opacity;
      transform: $form-floating-label-transform;
    }
  }
  // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
  > .form-control:-webkit-autofill {
    ~ label {
      opacity: $form-floating-label-opacity;
      transform: $form-floating-label-transform;
    }
  }
  // stylelint-enable no-duplicate-selectors
}

Version data entries

101 entries across 101 versions & 11 rubygems

Version Path
card-mod-bootstrap-0.18.1 vendor/bootstrap/scss/forms/_floating-labels.scss
card-mod-bootstrap-0.18.0 vendor/bootstrap/scss/forms/_floating-labels.scss
rails_admin-3.2.1 vendor/assets/stylesheets/rails_admin/bootstrap/forms/_floating-labels.scss
headmin-0.6.3 app/assets/stylesheets/headmin/vendor/bootstrap/scss/forms/_floating-labels.scss
rails_admin-3.2.0 vendor/assets/stylesheets/rails_admin/bootstrap/forms/_floating-labels.scss
rails_admin-3.2.0.rc vendor/assets/stylesheets/rails_admin/bootstrap/forms/_floating-labels.scss
rails_admin-3.2.0.beta vendor/assets/stylesheets/rails_admin/bootstrap/forms/_floating-labels.scss
rails_admin-3.1.4 vendor/assets/stylesheets/rails_admin/bootstrap/forms/_floating-labels.scss
rails_admin-3.1.3 vendor/assets/stylesheets/rails_admin/bootstrap/forms/_floating-labels.scss
card-mod-bootstrap-0.17.0 vendor/bootstrap/scss/forms/_floating-labels.scss
card-mod-bootstrap-0.16.0 vendor/bootstrap/scss/forms/_floating-labels.scss
vitat-css-0.1.3 bootstrap/scss/forms/_floating-labels.scss
vitat-css-0.1.2 bootstrap/scss/forms/_floating-labels.scss
card-mod-bootstrap-0.15.6 vendor/bootstrap/scss/forms/_floating-labels.scss
jekyll-theme-petridish-3.0 _sass/bootstrap/forms/_floating-labels.scss
card-mod-bootstrap-0.15.5 vendor/bootstrap/scss/forms/_floating-labels.scss
card-mod-bootstrap-0.15.4 vendor/bootstrap/scss/forms/_floating-labels.scss
card-mod-bootstrap-0.15.3 vendor/bootstrap/scss/forms/_floating-labels.scss
card-mod-bootstrap-0.15.1.2 vendor/bootstrap/scss/forms/_floating-labels.scss
card-mod-bootstrap-0.15.2.pre1 vendor/bootstrap/scss/forms/_floating-labels.scss