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

Don't generate invalid CSS when given an array of property values #224

Merged
merged 2 commits into from
Dec 10, 2021

Conversation

thecrypticace
Copy link
Contributor

Partial fix for tailwindlabs/tailwindcss#6336

You can customize the config to control the default CSS that's generated and multiple values are intended to support fallback values for properties.

For example:

css: {
  textAlign: ['-webkit-match-parent', 'match-parent'],
}

should result in:

.prose {
  text-align: -webkit-match-parent;
  text-align: match-parent;
}

However passing in an array resulted in invalid CSS. This fixes that. There is a second problem in tailwind itself which causes the above to only take the last value in the array so instead you end up with this:

.prose {
  text-align: match-parent;
}

That problem will need to be solved separately but we are at least now generating valid css.

@vercel
Copy link

vercel bot commented Dec 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-typography/DxbGksSuKo9zx8zYWDgdtFoFMsoN
✅ Preview: https://tailwindcss-typography-git-fix-no-invalid-c-e2f9c7-tailwindlabs.vercel.app

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