tailwindcss-typography icon indicating copy to clipboard operation
tailwindcss-typography copied to clipboard

Fix apply custom className to CSS variables as well

Open aversini opened this issue 1 year ago • 1 comments

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.

aversini avatar Apr 18 '24 14:04 aversini

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

vercel[bot] avatar Apr 18 '24 14:04 vercel[bot]