Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating labels not working in Parcel example #165

Open
nkdas91 opened this issue Apr 14, 2023 · 0 comments
Open

Floating labels not working in Parcel example #165

nkdas91 opened this issue Apr 14, 2023 · 0 comments

Comments

@nkdas91
Copy link

nkdas91 commented Apr 14, 2023

In Parcel example, Floating labels work only when I remove the following code from examples/parcel/node_modules/bootstrap/scss/forms/_floating-labels.scss

// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
> .form-control:-webkit-autofill {
  ~ label {
    opacity: $form-floating-label-opacity;
    transform: $form-floating-label-transform;
  }
}

Steps to reproduce the issue:

  1. In examples/parcel/src/scss/styles.scss, uncomment @import "bootstrap/scss/forms";
  2. Add floating labels example to examples/parcel/src/index.html
<div class="form-floating mb-3">
  <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
  <label for="floatingInput">Email address</label>
</div>
<div class="form-floating">
  <input type="password" class="form-control" id="floatingPassword" placeholder="Password">
  <label for="floatingPassword">Password</label>
</div>
  1. npm install
  2. npm start (the label won't float when focused)
  3. Remove/Comment the above SCSS and it works

Not working on: Chrome 108.0.5359.71 (This version is outdated) on Ubuntu 16.04

Works on:
Firefox on Ubuntu 16.04 and Chrome 112 on Windows 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant