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

Theme token not being parsed when overriding CSS prop (Next.js)

sebpowell opened this issue · comments

I'm using Stitches with Next.js, and noticed what seems like it might be a bug the other day.

I'm able to do something like this without any problems:

import { styled, config } from "stitches.config";

const Button = styled("button", {
  color: "$purple10"
})

This works as expected.

However, if I then do this:

<Button css={{color: "$red10" }} />

I get something like the following:

Screenshot 2023-02-01 at 21 16 39

So it looks like, for whatever reason, the token isn't being parsed, but this is only an issue when overriding.

Is anyone else experiencing this? I'm getting it in both Next.js 12.2.4 and Next.js 13.1.4.

Any help would be greatly appreciated.

Got same bug in here :(