fix(tailwind): new typography config for tailwind #914
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.
BREAKING CHANGE: Tailwind variable names have been updated, requiring refactoring to align with the new names in product teams. More info on this can be found in the ZeroHeight docs under Tailwind configuration.
Summary
Tailwind
Github issue: #913
The current design token definitions exported for Tailwind using Style Dictionary are incorrect. We need to ensure that the generated tailwind.json file adheres to the correct format and aligns with Tailwind’s configuration standards.
The new typography variables are defined in the sds tailwind.json file like so:
To include these typography variables in your Tailwind setup, you can import them from the sds
tailwind.json
file and feed them into the extend section of yourtailwind.config.js
file:Once the typography configuration is set up, you can apply the custom typography style in your HTML using the prose class along with the specific typography variant:
Checklist
defaultTheme.ts
used wherever possible