Fully custom theme vs overriding Modena

Ed Kennard ed at kennard.net
Wed Mar 31 11:29:49 UTC 2021


Hi all,

I’m about to embark on some work which will remove our dependency on the Modena theme.  We currently import Modena then override it wherever necessary, but now I want to replace that with our own custom CSS built from the ground up.  The new custom CSS will be simpler and flatter than Modena, using a lot less insets, borders etc on the controls, and will only target the specific controls we need styling for in the app, so the expectation is to have a significantly smaller amount of CSS loading into JavaFX than we currently have.

My questions for the list are:

- Given the CSS styling of controls will be simpler than Modena, and there'll be a reduced amount of CSS that JavaFX will need to load as well as process throughout the app while it's running, I'm expecting to see less CSS churn while profiling the app, and perhaps even some visibly noticeable performance improvements, too.  Is this a reasonable expectation, or is that unlikely in reality?

- To anyone who has experience implementing custom themes, do you have any wisdom to impart, or links to any such advice, to help me prepare for this, design my CSS in the most JavaFX-optimal way possible, or avoid any common mistakes?

Thanks!

Ed




More information about the openjfx-dev mailing list