Skip to content

Conversation

@thecrypticace
Copy link
Contributor

We collapse adjacent rules and media queries automatically. This is because of the way @apply works by generating a Rule/AtRule for every class in an apply. However, when given something like @apply md:text-black md:bg-white we would not collapse the rules inside the media query. This isn't strictly necessary but it would result in a bit of a win with smaller generated CSS if you're using @apply.

I refactored a bit to collapse adjacent rules at the top level and then find all at rules and collapse their children recursively until there's nothing left to collapse.

Fixes #4896

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.

Duplicated CSS rules in @media output

2 participants