stitchesjs / stitches

[Not Actively Maintained] CSS-in-JS with near-zero runtime, SSR, multi-variant support, and a best-in-class developer experience.

Home Page:https://stitches.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Simplified Responsive Variants Api

Code-Victor opened this issue Β· comments

When using Stitches responsive variants, I get a bit frustrated having to continually add quotes and the "@" sign. It would be better if we could do away with them and go for a simpler approach.
So instead of this πŸ‘‡

<Stack
  gap={{ "@sm": 2, "@md": 5, "@lg": 10 }}
  direction={{ "@sm": "column", "@lg": "row"}}
>
  <Box />
  <Box />
  <Box />
</Stack>

We can use this πŸ‘‡

<Stack
  gap={{ sm: 2, md: 5, lg: 10 }}
  direction={{ sm: "column", lg: "row"}}
>
  <Box />
  <Box />
  <Box />
</Stack>

Simpler and easier on the eye