Markup, selector :empty should allow you to select text areas that have absolutely no content, not even like a space or line break. And vice versa :not(:empty) should allow you to select non-empty text fields.
CSS selectors are mostly static, that is, they do not take into account dynamic changes, for example, if you edit the contents of the text field after loading the page. In addition, a selector like :empty does not really take into account the value of textarea, since it checks for the presence (or absence) of content nodes in general, so I suspect it does not work very well with forms.
If you need to dynamically apply styles depending on the value of the form field, you will need to use a script to check its value with .val() or something similar with each update.
Boltclock
source share