On Wed, 26 May 2021 17:52:35 GMT, Jose Pereda <jper...@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

Reply via email to