On Thu, 10 Apr 2025 10:05:37 GMT, Michael Strauß <mstra...@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 more tests

In the .md document, you make a reference to w3.org media queries, so one 
question comes right away: do you eventually plan to implement the whole spec 
as defined there, or we are really talking about a very small subset of 
features?

For example, do you plan to support media query operations like `and`, `not`, 
`only`, etc.?  Also, the w3.org spec might be way too complicated even to be 
referenced - things there will never apply to JavaFX (`tty`, `projection`, 
`speech`, etc.)

Alternatively, wouldn't it make _more_ sense to add variables to the JavaFX CSS 
instead?  Or maybe in conjunction with a simpler media-query-like syntax, 
something like @if(scene.isDark)?

My concern is that the media query features (whatever subset of it we decide to 
implement) might make the code way too complex without providing substantial 
benefit, and perhaps we can achieve the same goal (of dynamically activating 
parts of the stylesheet) using simpler solutions like variables?

What do you think?

Also, would it be possible to add Goals and Non-Goals to the .md, make it more 
JEP-like?

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

PR Comment: https://git.openjdk.org/jfx/pull/1655#issuecomment-2794373071
PR Comment: https://git.openjdk.org/jfx/pull/1655#issuecomment-2794376884

Reply via email to