Skip to content

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.
@vercel
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

@philipp-spiess
Copy link
Member

Hey @Aversin! Thanks for the PR but I'm going to say no to this. I do understand why this would be helpful to add but it doesn't seem often requested and with Tailwind CSS v4 and our plan to eventually replace this JavaScript plugin with a CSS-only plugin (more in line with the Tailwind 4 idea), I don't see us making these changes unfortunately. Still really appreciate the time you put in and sorry that it took over a year for someone to get back to you about this!

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.

2 participants