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

Refactor shorthandInlineCSS #855

Merged
merged 3 commits into from Dec 9, 2022
Merged

Refactor shorthandInlineCSS #855

merged 3 commits into from Dec 9, 2022

Conversation

cossssmin
Copy link
Member

This PR:

  • refactors shorthandInlineCSS so that it runs after removeUnusedCSS.

    This was necessary because running it before lead to a situation where CSS in body no longer matched that in the head, resulting in stray classes left over.

  • adds consistency between shorthand inline CSS (in the body) and compiled Tailwind CSS (like when you write custom CSS like .padded { @apply px-4 py-2; }).

    Compiled Tailwind CSS was always shorthanded as long as you were not developing locally, meaning even when you didn't enable shorthandInlineCSS. This makes them consistent and opens the way to a more generic shorthandCSS option that will replace shorthandInlineCSS in the near future, since it doesn't really make sense to have them separated.

merge longhand props when compiling tailwindcss only if user enabled it
same as `shorthandInlineCSS`; both will work
@cossssmin
Copy link
Member Author

Actually went ahead and added support for shorthandCSS too. So you can use that or shorthandInlineCSS, it still works ofc 👍

@cossssmin cossssmin merged commit 61165dc into next Dec 9, 2022
@cossssmin cossssmin deleted the refactor-shorthand-css branch December 9, 2022 13:54
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.

None yet

1 participant