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 conditions that
are not possible to achieve with just css expressions.
In general, having the media queries only available in css is also
limiting for many more advanced customizations. If I want to for example
subscribe to a certain states, e.g. when the width crosses a certain
breakpoint, to run a listener that changes some node properties.
Custom media queries can also just be implemented using a listener that
sets pseudo class states on the root node for each scene. However,
always found it annoying having to specify something like .root:xl
.button {} to replicate these breakpoints. If there was such a thing as
recursive pseudo classes that would allow querying them in css via
.button:xl when they are only set for a parent or root node, that would
work as well as an alternative.
On 12/07/2025 19:49, Michael Strauß wrote:
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<crschn...@xpipe.io> wrote:
That is very exciting.
Would it be possible to create custom boolean properties that one can
then use for media queries? For example, having a ObservableMap<String,
ObservableBooleanValue> in the new scene preferences to define custom
features that can then be matched in the stylesheet.