IMO, css rules -- whether on the web or in tornadofx -- are best as a collection of static items rather than things that are defined on-the-fly. There's plenty of room for dynamic behavior (javacript, FX events) but a lot of times pseudo styles can be used that also follow a declarative (no logic to be tested) approach