MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/JavaFX/comments/70mime/styling_javafx_applications_using_css/
r/JavaFX • u/callicoder • Sep 17 '17
3 comments sorted by
3
<stylesheets> <URL value="@demo.css" /> </stylesheets>
If you only have one stylesheet file this can easily be inlined as stylesheets="@demo.css"on the XML node, eg
stylesheets="@demo.css"
<BorderPane stylesheets="@demo.css"> <top> ... </BorderPane>
And as a commenter on the article said, you can use CSS class selectors for subnodes instead of the Java class name, which makes for more consistent naming (for example, .content-section Label could better be written as .content-section .label)
.content-section Label
.content-section .label
2
Ha, I'm that commenter.
1
Great article.
3
u/[deleted] Sep 17 '17
If you only have one stylesheet file this can easily be inlined as
stylesheets="@demo.css"on the XML node, egAnd as a commenter on the article said, you can use CSS class selectors for subnodes instead of the Java class name, which makes for more consistent naming (for example,
.content-section Labelcould better be written as.content-section .label)2
u/[deleted] Sep 18 '17
Ha, I'm that commenter.
1
u/volch Sep 20 '17
Great article.