简体   繁体   中英

Is There A Way To Print A TornadoFX Stylesheet?

I'm trying to verify the CSS used in a Stylesheet that utilizes custom cssproperty s 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.

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())
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM