On Fri, 19 Jun 2026 20:53:36 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).

Looks good and the logic is very similar to the previous `ConditionalFeature` 
PR: https://github.com/openjdk/jfx/pull/2161

I also like the change that the `DEFAULT` variable is not public anymore (I 
commented on that back in the `Conditional stylesheet imports` PR: 
https://github.com/openjdk/jfx/pull/2031#discussion_r2937363946).

Conceptually, it is a bit strange to have `unix` as a standalone platform. It 
seems to include the `Linux` and `Solaris` platform when looking into 
`PlatformUtil`. But not `Mac`, which is also a Unix platform and even Unix 
certified AFAIK.

So that might be something we should have a look at before baking it into the 
new `-fx-platform` API. If `Solaris` is not important anymore, we could 
probably replace `isUnix` with `isLinux` (only used 2 times in prod code).

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

Marked as reviewed by mhanl (Committer).

PR Review: https://git.openjdk.org/jfx/pull/2193#pullrequestreview-4543030317

Reply via email to