There are various custom mediaquery syntaxes out there within container/element queries libs having syntaxes like 100px <= width < 500px
and so on, but does anyone know of an utility that only focuses on expanding short custom media queries into full queries that can then be passed to matchMedia
or be used together with Styled Components?
I tried to have a look at NPM, but didn't really find anything that would focus on this specific issue.
Top comments (1)
Okay, there hasn't been much activity here, but here is something I made last night.
You can write:
And you can config it a lot so you can get something usable with Styled Components:
This is just a thing I assumed would already be solved by someone, but so far breakpoint tools seem to mostly focus to doing traditional mobile-first where you have only
min-width
based queries, and if you havemax-width
then you have to write more code.