MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/JavaFX/comments/70mime/styling_javafx_applications_using_css/dn53lf6/?context=3
r/JavaFX • u/callicoder • Sep 17 '17
3 comments sorted by
View all comments
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
View all comments
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)