Fix apply custom className to CSS variables as well #348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.