GuestNo new alerts

Element Query Trials

- Updates964
We're experimenting with element queries to provide a more flexible way of writing responsive themes which doesn't rely on media queries.

Unlike media queries which apply rules based on the size of the viewport, element queries apply rules based on the size of an ancestor element.

This'll be particularly helpful for allowing toggle-able sidebars without breaking all the CSS or having to double up on the media queries and to reuse components in multiple places.
We're using element queries in production in Cosora, however use has mostly stagnated due to the performance implications of it which I have partially mitigated with a custom build of EQCSS.

I would like to take another look at it in the near future, but I'd like to get the alpha channel open first.
Going forward, we're probably going to keep element queries off mobile along with CSS animations and other more intensive features. For the most part, we have already done this, so there's not much for us to do.

I've begun adding element queries again here and there for desktop, and you'll see the changes in the coming days.