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

Wrong rules order for filter utility with only one filter enabled #4849

Closed
Djules opened this issue Jul 1, 2021 · 2 comments · Fixed by #4852
Closed

Wrong rules order for filter utility with only one filter enabled #4849

Djules opened this issue Jul 1, 2021 · 2 comments · Fixed by #4852

Comments

@Djules
Copy link

Djules commented Jul 1, 2021

What version of Tailwind CSS are you using?

v2.2.4

What build tool (or framework if it abstracts the build tool) are you using?

webpack 4.46.0

What version of Node.js are you using?

v14.1.0

What browser are you using?

Chrome

What operating system are you using?

macOS Mojave

Reproduction repository

none

Describe your issue

In an attempt to ship only plugins I need, I disabled every filter but one in my config file, so I set every filter to false in corePlugins section, except for filter and invert (for example).

The issue is the .filter {} rule is printed AFTER the one for .invert {}.

It's always be as long as you enabled only one filter at a time. As soon as you enabled at least twice, the order is fine, the .filter {} rule is printed first.

And it's a problem because the .filter {} rule reset all CSS variables for filters…

@adamwathan
Copy link
Member

Thanks, fixed! Will try to tag a patch this morning.

@Djules
Copy link
Author

Djules commented Jul 1, 2021

Awesome! 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants