Home > Mobile >  Is There A Way To Print A TornadoFX Stylesheet?
Is There A Way To Print A TornadoFX Stylesheet?

Time:10-26

I'm trying to verify the CSS used in a Stylesheet that utilizes custom csspropertys but they don't seem to be working. I can't tell if I'm writing it all correctly and I'd like to check to see what is actually being used. Is there a way to print out a Stylesheet?

Edit: To be clear, these are TornadoFX classes, not just plain CSS. I am trying to verify type-safe CSS, not trying to print a CSS file.

CodePudding user response:

Moving my comment to an answer

To see the CSS that will be generated by a Stylesheet, instantiate it and call the its render() function:

class MyStyles : Stylesheet {
    ...
}

fun main() {
    println(MyStyles().render())
}

  • Related