Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind imports using path instead of package #2757

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Boettner-eric
Copy link

The current tailwind config for the Docs theme generates tailwind classes for nextra components that cross the package boundary. This leads to weird behavior if a user wants to modify either nextra or the docs theme without effecting the other as the css is coupled.

This PR uses the Nextra build assets instead of the source files from the Nextra package. This should make it easier for developers to build in the monorepo without unexpected css issues.

Copy link

changeset-bot bot commented Mar 1, 2024

🦋 Changeset detected

Latest commit: 8c79436

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Mar 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextra-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 1, 2024 11:59pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nextra ⬜️ Ignored (Inspect) Visit Preview Mar 1, 2024 11:59pm

Copy link

vercel bot commented Mar 1, 2024

Someone is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your described problem, can you share more details about weird behavior

@Boettner-eric
Copy link
Author

If you try building the nextra-theme-docs package from the monorepo while using a nextra version that isn't in the monorepo the tailwind classes for nextra are pulled from the nextra folder instead of the package itself. If someone modifies the nextra folder or in my case uses a different nextra version the classes aren't read by the tailwind compiler.

The easiest way to replicate this is to swap the nextra version to a non-workspace one and temporarily remove or rename the nextra folder. The page renders with lots of css issues and its clear that tailwind is missing some of the required classes.

tailwind-issue-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants