For anyone interested in using SCSS stylesheets with JavaFX, I created
an easy to use wrapper.  Example:

Scenescene = newScene(mainWindow);

Path rootFolder = Path.of("styles");

SCSSCompiler compiler = SCSSCompiler.of(rootFolder);

scene.getStylesheets().add(compiler.asURIString(Path.of("styles/dark-theme.scss")));

The project is on Github: https://github.com/int4-org/SCSS

Include it as a dependency like this:

<dependency>

<groupId>org.int4.scss</groupId>

<artifactId>scss-compiler</artifactId>

<version>1.86.1</version>

</dependency>

(It follows the versioning of the SCSS compiler project).

--John

Reply via email to