RFR: 8345348: CSS Media Queries [v5]
John Hendrikx
jhendrikx at openjdk.org
Fri Apr 4 12:49:03 UTC 2025
On Fri, 4 Apr 2025 11:13:43 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 incrementally with one additional commit since the last revision:
>
> add documentation
I think you should consider moving `MediaRule`, `MediaQuery` and `MediaQueryContext` to `com.sun.javafx.css` (or similar internal package). The javafx.css module IMHO should not be further extended in its current form, as IMHO it needs a rethink first. From what I gather it was only made public to support writing binary CSS files, which was done primarily to be able to load huge stylesheets like caspian/modena a bit faster; it's public interface was never really thought through, and there are no known users (aside from Scene Builder), and AFAIK no use cases for the API (`StyleSheet` can't be directly used by the CSS engine, and doing so would probably cripple it as the `StyleSheet` class seems to be observable in all its aspects -- I have doubts any of that is currently in use, but perhaps Scene Builder uses it).
I verified on a local build that this is easy to do (you need to make some constructors public, and the writeBinary/readBinary functions after they've been moved to the internal package).
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1655#issuecomment-2778640513
More information about the openjfx-dev
mailing list