[英]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.我正在尝试验证在使用自定义
cssproperty
的Stylesheet
中使用的 CSS ,但它们似乎不起作用。 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
?有没有办法打印出
Stylesheet
?
Edit: To be clear, these are TornadoFX classes, not just plain CSS.编辑:需要明确的是,这些是 TornadoFX 类,而不仅仅是普通的 CSS。 I am trying to verify type-safe CSS, not trying to print a CSS file.
我正在尝试验证类型安全的 CSS,而不是尝试打印 CSS 文件。
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:要查看将由
Stylesheet
生成的 CSS,请对其进行实例化并调用其render()
function:
class MyStyles : Stylesheet {
...
}
fun main() {
println(MyStyles().render())
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.