这是indexloc提供的服务,不要输入任何密码
Skip to content

📚 Docs: with-tailwind example shared-styls.css not working #11054

@Hobby-Student

Description

@Hobby-Student

What is the improvement or update you wish to see?

Hi out there,

I'm fairly new to turborepo and tailwind, but I didn't find any solution for this. I created a new turborepo with pnpm dlx create-turbo@latest --example with-tailwind. After that I use pnpm run dev and open http://localhost:3000. It doesn't render the background gradient with the info "--red-1000 not defined" (also blue and purple). The missing vars are located in packages/tailwind-config/shared-styles.css and if I modify the theme with static it injects the vars and background is working. I don't know if this is the right approach. Could someone please take a look at this example?

Thanks in advance!

Is there any context that might help us understand?

current:

@theme {
  --color-blue-1000: #2a8af6;
  --color-purple-1000: #a853ba;
  --color-red-1000: #e92a67;
}

working:

@theme static {
  --color-blue-1000: #2a8af6;
  --color-purple-1000: #a853ba;
  --color-red-1000: #e92a67;
}

Does the docs page already exist? Please link to it.

https://github.com/vercel/turborepo/tree/main/examples/with-tailwind

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: docsImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions