_floating-labels.scss 622 B

123456789101112131415161718192021222324252627
  1. .form-floating {
  2. // > label {
  3. // border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
  4. // }
  5. > .form-control {
  6. // &::placeholder {
  7. // color: transparent;
  8. // }
  9. }
  10. > .form-control:focus,
  11. > .form-control:not(:placeholder-shown),
  12. > .form-select {
  13. ~ label {
  14. opacity: $form-floating-label-opacity-alt;
  15. }
  16. }
  17. // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
  18. > .form-control:-webkit-autofill {
  19. ~ label {
  20. opacity: $form-floating-label-opacity-alt;
  21. }
  22. }
  23. }