RFR: 8345348: CSS media feature queries [v34]

Kevin Rushforth kcr at openjdk.org
Tue Jul 8 19:04:49 UTC 2025


On Fri, 20 Jun 2025 01:39:49 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

>> Implementation of [CSS media queries](https://gist.github.com/mstr2/cbb93bff03e073ec0c32aac317b22de7).
>
> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 50 commits:
> 
>  - Merge branch 'master' into feature/media-queries
>  - Merge branch 'master' into feature/media-queries
>  - Merge branch 'master' into feature/media-queries
>  - use custom mediaFeature javadoc tag
>  - Merge branch 'master' into feature/media-queries
>  - fix wrong <br> HTML tags
>  - Merge branch 'master' into feature/media-queries
>  - doc
>  - reorder Scene.Preferences.colorScheme
>  - move doc from Scene.Preferences to Platform.Preferences
>  - ... and 40 more: https://git.openjdk.org/jfx/compare/fc4642db...b01f0414

The API changes look good. The cssref docs and the class docs for the new Scene.Preferences class look good. The one problem I see is that the `@mediaFeature` javadoc tag doesn't render anything, at least not when I run `gradle javadoc` using the default JDK 24.

You might need to revert this change and link to the cssref manually.

I note that the CSR spec was done before this change, so depending on how you resolve this, the spec should be regenerated.

modules/javafx.graphics/src/main/java/javafx/application/Platform.java line 617:

> 615:          *
> 616:          * @return the {@code persistentScrollBars} property
> 617:          * @mediaFeature <a href="../scene/doc-files/cssref.html#mediafeatures">{@code -fx-prefers-persistent-scrollbars}</a>

I note that this tag seems to be ineffective (perhaps because this is a property and gets special javadoc treatment).

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

PR Review: https://git.openjdk.org/jfx/pull/1655#pullrequestreview-2998731760
PR Review Comment: https://git.openjdk.org/jfx/pull/1655#discussion_r2193197562


More information about the openjfx-dev mailing list