On Sun, 28 Jun 2026 16:45:07 GMT, Michael Strauß <[email protected]> wrote:

>> Add the `-fx-platform` media query (similar to `-moz-platform` in Firefox) 
>> that allows applications to switch styles based on the operating system on 
>> which the application is running.
>> 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Michael Strauß has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   remove "embedded" and "headless" platforms

I've decided to remove both `embedded` and `headless`, so the platform query 
now only detects the actual OS on which JavaFX is running. I think this is 
simpler than overloading `-fx-platform` with JavaFX concepts like what counts 
as an embedded platform.

Of course, as @Maran23 pointed out, the current themes _do_ switch stylesheets 
based on whatever "embedded" means. However, the "embedded" stylesheet does 
nothing more than remove `-fx-effect` from all kinds of controls. This is 
obviously very crude, because there are certainly embedded devices that are not 
slow to render effects.

I think that we should instead add the 
[update](https://www.w3.org/TR/mediaqueries-5/#update) media query for this 
purpose, which matches `slow` for severely under-powered devices. That would be 
better than using `-fx-platform: embedded` to mean "remove effects".

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2193#issuecomment-4826760364

Reply via email to