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

Line ripple for text fields #177

Open
djibe opened this issue Mar 28, 2018 · 3 comments
Open

Line ripple for text fields #177

djibe opened this issue Mar 28, 2018 · 3 comments

Comments

@djibe
Copy link

djibe commented Mar 28, 2018

Hi Maya,
I see that in its web components, Google set a line ripple on focus on inputs (http://material-components-web.appspot.com/text-field.html), and described in material.io as "Motion: Ripple & wash".
Here is my try (thanks to Propeller) : https://jsfiddle.net/djibe89/r2sda9ze/

Maybe you could integrate the label color by default (learning to build plugins now).

@sesemaya
Copy link
Contributor

Prefer a pure CSS solution for this.

This could be achieved by a combination of linear gradient background and background size.

A very very very basic idea is maybe something like:

Init state:

background-image: linear-gradient(to top, pink, pink);
background-position: 50% 100%;
background-repeat: no-repeat;
background-size: 0 2px;

Focus state:

background-size: 100% 2px;

However, this may not work well with borders. Need further testing.

@mkhairi
Copy link

mkhairi commented May 11, 2018

@sesemaya sesemaya added this to the Backfilling Bootstrap v4.4.1 milestone Jan 8, 2020
@djibe
Copy link
Author

djibe commented May 29, 2020

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

No branches or pull requests

3 participants