On Mon, 29 Jun 2026 17:41:05 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:
> 
>   "linux" means "unix but not macOS"

I think we can define `linux` as "Unix, but not macOS and not Android" so that 
it includes systems like Solaris. From a UI perspective, there's no need to 
differentiate between different flavors of Unix, so long as all of those 
flavors use our GTK pipeline.

Calling the feature value `unix` would be confusing, because it doesn't match 
for unix-like systems where our rendering platform is not GTK. And from a 
developer perspective, I think "linux" is generally understood to also include 
systems with different branding.

The developers of 
[Firefox](https://github.com/mozilla-firefox/firefox/blob/c686530f70e9d4b8b4285d931a5630504939fca8/servo/components/style/gecko/media_features.rs#L562)
 also chose those semantics with the same rationale:


pub enum Platform {
    /// Matches any Android version.
    Android,
    /// For our purposes here, "linux" is just "gtk" (so unix-but-not-mac).
    /// There's no need for our front-end code to differentiate between those
    /// platforms and they already use the "linux" string elsewhere (e.g.,
    /// toolkit/themes/linux).
    Linux,
    /// Matches any iOS version.
    Ios,
    /// Matches any macOS version.
    Macos,
    /// Matches any Windows version.
    Windows,
}

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

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

Reply via email to