On Thu, 21 May 2026 20:01:07 GMT, Michael Strauß <[email protected]> wrote:
>> This PR adds the `-fx-supports-conditional-feature` media query, which >> allows applications to adapt their stylesheets to different platforms with >> varying conditional feature support. Currently, the built-in themes use >> hard-coded logic to include or exclude conditional-feature stylesheets. The >> new media query allows us to potentially remove the hard-coded logic in the >> future, and gives third-party themes an API to query conditional feature >> support. >> >> --------- >> - [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: > > add doc links Sorry for the delay. Changes look fine and work as expected. Have 2 very minor suggestions. modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html line 871: > 869: </figure> > 870: <h5 id="mf-boolean-context">Evaluating Media Features in a Boolean > Context</h5> > 871: <p>If the colon and value is omitted, the media feature is evaluated > in a boolean context. Already existing, but this should probably be: Suggestion: <p>If the colon and value are omitted, the media feature is evaluated in a boolean context. We can also do that in a follow up, but IMO is close enough so fine for me to do here. modules/javafx.graphics/src/test/java/test/javafx/css/CssParser_mediaQuery_Test.java line 359: > 357: > 358: var expected = > FunctionExpression.of("-fx-supports-conditional-feature", "scene3d", _ -> > null, true); > 359: var actual = mediaRule.getQueries().get(0); Very minor: This can be `getFirst()` (and `.get(2)` could be `getLast()` below) ------------- Marked as reviewed by mhanl (Committer). PR Review: https://git.openjdk.org/jfx/pull/2161#pullrequestreview-4518168912 PR Review Comment: https://git.openjdk.org/jfx/pull/2161#discussion_r3430272692 PR Review Comment: https://git.openjdk.org/jfx/pull/2161#discussion_r3430330928
