The normal way to introduce dynamic styling (styling based on attribute values) is to duplicate widgets, give them different class names and put a visibility expression on them or on the container. Or you use a widget from the app store which injects the classes dynamic. In my opinion to much overhead to accomplish the desired styling.
How cool would it be to use expressions in the class property. The expression should lead to a class name. The expression should be data context aware.