November 5, 2019 06:21 pm GMT
Original Link: https://css-tricks.com/show-search-button-when-search-field-is-non-empty/
Show Search Button when Search Field is Non-Empty
I think the :placeholder-shown
selector is tremendously cool. It allows you to select the placeholder of an input (<input placeholder="...">
) when that placeholder is present. Meaning, the input does not yet have any value. You might think input[value]
could do that, or help match on the actual value, but it can't.
This makes :placeholder-shown
one of the few CSS properties that we have that can react to user-initiated state joining the likes of :hover
-and-friends, :checked
(checkbox … Read article
The post Show Search Button when Search Field is Non-Empty appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/show-search-button-when-search-field-is-non-empty/
Share this article:
Tweet
View Full Article