I am just playing with examples of TornadoFX, but I cannot reproduce the following https://github.com/edvin/tornadofx/wiki/Type-Safe-CSS, more precisely:
backgroundColor += hoverColor
Doesn't compile for me, it says type mismatch, required Paint, found CSSRule
Neither can I set the borderColor +=box(dangerColor)
, I also have a type mismatch
Your imports are wrong, try using the
import tornadofx.*
statement. Currently, you are using tornadofx.Stylesheet.Companion.box
function, instead of the box
function from CSSKt.class
.