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

Fix apply custom className to CSS variables as well #348

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

Conversation

aversini
Copy link

When "className" is used to change the default class from "prose" to something custom, the associated CSS variables are still named --tw-prose-xyz. This PR is making sure that if a user is asking for a custom class name, it is also applied to the underlying CSS variables.

The idea is that if a user needs a custom class name, it probably means they need to be fully independent from the default typography styles, including from the CSS variables. A scenario would be a an application that uses some components they cannot update, using the default typography with prose, and some custom components with their specific styles.

When "className" is used to change the default class from "prose" to something custom, the associated CSS variables would still be named "tw-prose-xyz". This PR is making sure that if a user is asking for a custom class name, it is also applied to the underlying CSS variables.
Copy link

vercel bot commented Apr 18, 2024

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

Name Status Preview Comments Updated (UTC)
tailwindcss-typography ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 1:47pm

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.

1 participant