Elektrine lite

← Feed

@mia@front-end.social

Post #2375672

2023-01-05 03:45 UTC

I think I accidentally framed this as a negative. This is not a failed attempt at custom media! That might also happen - and has its own limitations. This doesn't just allow a static "naming" of reused queries, it actually means we can define contextual values that *change what a query means per container*. That's a way more powerful feature which can only work in container queries! So much potential here that goes beyond static re-usable breakpoints.

Replies (1)

  • @AmeliaBR@front-end.social 2023-01-06 02:17

    @mia@front-end.social Maybe an example of dynamic variable would be having a `--column-width` variable, and so the container query would be testing if the container is at least 3 columns wide or similar. But the width of your default column could change based on the media query or higher-up containers. (If it's just a constant, it would ideally be done with custom env() rather than var() but I guess we have to wait for that, too...)

    Open ##2375677