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

Support :placeholder-shown pseudo-class #7

Closed
Zirro opened this issue Apr 15, 2018 · 3 comments
Closed

Support :placeholder-shown pseudo-class #7

Zirro opened this issue Apr 15, 2018 · 3 comments

Comments

@Zirro
Copy link
Contributor

Zirro commented Apr 15, 2018

The :placeholder-shown pseudo-class has pretty good support in recent browsers. It matches <input> elements which are currently showing their placeholder text. This can probably be implemented by checking that the element has a placeholder, but isn't currently focused.

Specification: https://drafts.csswg.org/selectors-4/#placeholder

Test: https://github.com/w3c/web-platform-tests/blob/master/html/semantics/selectors/pseudo-classes/placeholder-shown-type-change.html

@dperini
Copy link
Owner

dperini commented Apr 16, 2018

This one was already on the list of candidates, I just needed a push from interested people. It does not look difficult to implement. I am going to add this too.

@dperini
Copy link
Owner

dperini commented Apr 18, 2018

@Zirro ok, started working on it.

Added initial handling code for ":placeholder-shown" in 3758218

Have not tested yet but during the next weekend I might have more time for this.

@Zirro
Copy link
Contributor Author

Zirro commented May 18, 2018

This has been implemented now 🎉

@Zirro Zirro closed this as completed May 18, 2018
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

2 participants