Skip to content

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

Open
@sebpowell

Description

@sebpowell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions