JavaFX 25 introduces user-preference media queries, which allows developers to probe user preferences in stylesheets.
I propose to enhance media queries by adding the following viewport characteristics media features [0]: 1. width 2. height 3. aspect-ratio (=width/height) 4. orientation (with values "portrait" and "landscape") 5. display-mode (with values "fullscreen" and "standalone") These additional media features make it easier to create responsive user interfaces. For example, a stylesheet could have different styles depending on the window width: @media (width <= 500) { // ... } @media (500 < width < 1000) { // ... } @media (width >= 1000) { // ... } [0] https://www.w3.org/TR/mediaqueries-5/#mf-viewport-characteristics