Sha256: 09932144f654fbd7a98066f31ebd8405307239f40bb0a6292da66db68e24d6c6

Contents?: true

Size: 1.67 KB

Versions: 33

Compression:

Stored size: 1.67 KB

Contents

.form-floating {
  position: relative;

  > .form-control,
  > .form-select {
    height: $form-floating-height;
    padding: $form-floating-padding-y $form-floating-padding-x;
  }

  > 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 {
    &::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

33 entries across 33 versions & 5 rubygems

Version Path
mumuki-styles-3.1.0 app/assets/stylesheets/vendor/bootstrap/forms/_floating-labels.scss
mumuki-styles-3.0.4 app/assets/stylesheets/vendor/bootstrap/forms/_floating-labels.scss
mumuki-styles-3.0.2.2 app/assets/stylesheets/vendor/bootstrap/forms/_floating-labels.scss
mumuki-styles-3.0.2.1 app/assets/stylesheets/vendor/bootstrap/forms/_floating-labels.scss
jekyll-bootstrap-theme-1.1.0 _sass/bootstrap/forms/_floating-labels.scss
administrate-bootstrap-theme-0.2.2 app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_floating-labels.scss
bootstrap-5.0.1 assets/stylesheets/bootstrap/forms/_floating-labels.scss
mumuki-styles-3.0.3 app/assets/stylesheets/vendor/bootstrap/forms/_floating-labels.scss
mumuki-styles-3.0.2 app/assets/stylesheets/vendor/bootstrap/forms/_floating-labels.scss
jekyll-bootstrap-theme-1.0.0 _sass/bootstrap/forms/_floating-labels.scss
bootstrap-5.0.0 assets/stylesheets/bootstrap/forms/_floating-labels.scss
jekyll-bootstrap-theme-0.1.1 _sass/bootstrap/forms/_floating-labels.scss
jekyll-bootstrap-theme-0.1.0 _sass/bootstrap/forms/_floating-labels.scss
administrate-bootstrap-theme-0.2.0 app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_floating-labels.scss
mumuki-styles-3.0.1 app/assets/stylesheets/vendor/bootstrap/forms/_floating-labels.scss
bootstrap-5.0.0.beta3 assets/stylesheets/bootstrap/forms/_floating-labels.scss
administrate-bootstrap-theme-0.1.9 node_modules/bootstrap/scss/forms/_floating-labels.scss
administrate-bootstrap-theme-0.1.8 node_modules/bootstrap/scss/forms/_floating-labels.scss
administrate-bootstrap-theme-0.1.6 node_modules/bootstrap/scss/forms/_floating-labels.scss
administrate-bootstrap-theme-0.1.4 node_modules/bootstrap/scss/forms/_floating-labels.scss