If the Defined css is plain, scene builder renders the controls with the defined styles...
but if css custom color constants are used, scene builder renders the controls in white...
When I run the application, the style is applied properly(this is done by javaFX libraries) for the scene
note: linking the css file in the scene builder with preview > Scene StyleSheets > add a StyleSheet
is implied and that's why the basic stylesheet(without the css color constants) was working.
My Question is:
How do I make it(Scene builder) understand the CSS(color constants) styles
CSS:
.root {
-color1: #1BA1E2;
-color2: #F8F8F8;
-primary-color: -color1;
-secondary-color: -color2;
}
.windowbox {
-fx-border-radius: 50 0 50 0;
-fx-background-radius: 50 0 50 0;
-fx-background-color: -primary-color;
}
.lbl {
-fx-background-color: derive(-primary-color, -10%);
-fx-text-fill: -secondary-color;
}
the above css works perfectly during execution (in the runtime) but scene builder is oblivious to the styles