I would like to have entity (control or property) which has different states, which are possible to be colored by CSS.
For example, regard TextField, which can contain two sort of values, normal and erroneous. Once it contain erroneous value, it should be displayed "red". But the actual color should be definable from CSS.
Is this possible to implement?
I found plenty of Styleable*
interfaces or classes, but they are looked like able to accept any style.
Can I write and entity, which derives it's style from the value?