Skip to content

Conversation

@RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Sep 27, 2021

Imagine you have this css:

:root, .a {
  color: red;
}

If you never use the a class, then this would never be generated. However, if you have this:

:root { color: red }
.a { color: red }

Then the final result would look like this:

:root { color: red; }

Essentially what this PR does is make sure that we keep the full node if one of the selectors contains non "on-demandable" parts. E.g.: :root.


Fixes: #5085

@RobinMalfait RobinMalfait changed the title ensure full node stays, if only a partial is used Ensure full node stays, if only a partial is used Sep 27, 2021
@RobinMalfait RobinMalfait merged commit 5d6d84f into master Sep 28, 2021
@RobinMalfait RobinMalfait deleted the improve-combined-selectors branch September 28, 2021 09: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.

JIT removes classes that are used when the selector is combined with a class that isn't used

2 participants