Re: RFR: 8358450: Viewport characteristics media features [v4]

2025-07-27 Thread Michael Strauß
> Implementation of [viewport characteristics media > features](https://www.w3.org/TR/mediaqueries-5/#mf-viewport-characteristics): > * `width` > * `height` > * `aspect-ratio`: width / height > * `orientation`: `portrait`, `landscape` > * `display-mode`: `fullscreen`, `standa

Re: RFR: 8358450: Viewport characteristics media features [v3]

2025-07-15 Thread Michael Strauß
> Implementation of [viewport characteristics media > features](https://www.w3.org/TR/mediaqueries-5/#mf-viewport-characteristics): > * `width` > * `height` > * `aspect-ratio`: width / height > * `orientation`: `portrait`, `landscape` > * `display-mode`: `fullscreen`, `standa

Re: Viewport characteristics media features

2025-07-14 Thread Michael Strauß
I assume that custom media queries would follow the same rules as custom variables. That means that a custom media query defined in a Scene stylesheet would be accessible in all Parent stylesheets. On Sun, Jul 13, 2025 at 3:46 AM Christopher Schnick wrote: > > Yeah that would definitely improve

Re: Viewport characteristics media features

2025-07-12 Thread Christopher Schnick
Yeah that would definitely improve the situation when it comes to repetitiveness. Would I need to define such custom media queries per stylesheet or can they apply globally? On 12/07/2025 20:24, Michael Strauß wrote: Maybe @custom-media queries can get you part of the way there: https://www.w3

Re: RFR: 8358450: Viewport characteristics media features [v2]

2025-07-12 Thread Michael Strauß
> Implementation of [viewport characteristics media > features](https://www.w3.org/TR/mediaqueries-5/#mf-viewport-characteristics): > * `width` > * `height` > * `aspect-ratio`: width / height > * `orientation`: `portrait`, `landscape` > * `display-mode`: `fullscreen`, `standa

Re: Viewport characteristics media features

2025-07-12 Thread Michael Strauß
Maybe @custom-media queries can get you part of the way there: https://www.w3.org/TR/mediaqueries-5/#custom-mq So instead of repeating a media query multiple times, you can define a custom media query like this: @custom-media --sm (width >= 40); And use it with the regular syntax: @media

Re: Viewport characteristics media features

2025-07-12 Thread Christopher Schnick
Assuming this would be available, I would implement custom css breakpoints to refer to common layout changes for our application. This would prevent a lot of repetition. For example, something similar to the tailwindcss breakpoints: I could also use it to define more advanced breakpoint condi

Re: Viewport characteristics media features

2025-07-12 Thread Michael Strauß
In general, I'm skeptical about inventing non-standard CSS features. What would be the use case for custom properties in the way that you describe? On Sat, Jul 12, 2025 at 6:03 PM Christopher Schnick wrote: > > That is very exciting. > > Would it be possible to create custom boolean properties t

Re: Viewport characteristics media features

2025-07-12 Thread Christopher Schnick
025 07:16, Michael Strauß wrote: 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 (=wi

RFR: 8358450: Viewport characteristics media features

2025-07-11 Thread Michael Strauß
Implementation of [viewport characteristics media features](https://www.w3.org/TR/mediaqueries-5/#mf-viewport-characteristics): * `width` * `height` * `aspect-ratio`: width / height * `orientation`: `portrait`, `landscape` * `display-mode`: `fullscreen`, `standalone` (note: `browser` and `minimal

Viewport characteristics media features

2025-07-11 Thread Michael Strauß
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