-
Notifications
You must be signed in to change notification settings - Fork 9
Stylesheets
Giorgio Garofalo edited this page Feb 9, 2021
·
3 revisions
Chorus supports external stylesheets that allow a wide customization of the whole UI.
Please note that JavaFX CSS is used.
You can load CSS files by calling loadStylesheet(file, target)
, where file
can be either a string referring to a relative path starting from the add-on folder, or a File
instance (it is possible to instantiate files from JS by using new File(name, /*optional*/ folder)
), while target
refers to the Node
the stylesheet has to be applied to. If not specified, the stylesheet will be global (tip: use it in onInit()
).
Stylesheet example:
.root {
-fx-background-color: #0c3318;
}
.menu-item {
-fx-background-color: green;
}