stitchesjs / stitches

[Not Actively Maintained] CSS-in-JS with near-zero runtime, SSR, multi-variant support, and a best-in-class developer experience.
https://stitches.dev
MIT License
7.72k stars 251 forks source link

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

Open sebpowell opened 1 year ago

sebpowell commented 1 year ago

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.

thefalked commented 1 year ago

Got same bug in here :(