RFR: 8267546: Add CSS themes as a first-class concept
Michael Strauß
mstrauss at openjdk.org
Wed Nov 9 22:30:45 UTC 2022
On Wed, 26 May 2021 17:52:35 GMT, Jose Pereda <jpereda at openjdk.org> wrote:
>> Just for reference: I've proposed [this enhancement](https://bugs.openjdk.java.net/browse/JDK-8267554) to load dynamic stylesheets that could be injected with the actual scheme colors. If added, this might be a better fix than matching color scheme names.
>
> How would that help? How would the high contrast stylesheets be loaded?
Instead of hardcoding the colors in stylesheets such as Modena's `blackOnWhite.css`, you could use placeholder symbols inside of the stylesheet. Then, you could read the stylesheet into a string, replace the placeholders with the actual system colors, and load the modified stylesheet with a "data" URI.
-------------
PR: https://git.openjdk.org/jfx/pull/511
More information about the openjfx-dev
mailing list