0
Hide the span until something is typed?
Is there a way to hide the span until something is typed? https://code.sololearn.com/W24N68LyD1ho/?ref=app
4 ответов
+ 1
Thanks!
0
You can add this to your CSS:
span:empty { display: none; }
or "display: hidden;" if you want it to take up space.
Hope this was what you were looking for! :)
0
Didn't know that was a pseudo element. Thanks!
Is there a list of all of them somewhere?
0
Sure thing!
Commonly used ones here:
https://www.w3schools.com/cssref/css_selectors.asp
but sometimes the CSS specifications will add some more insights.
https://www.w3.org/TR/selectors-3/
However, it also includes some selectors that browsers don't support yet, so it's generally a good idea to check browser support for each selector you actually want to use.
:)