feat(core,preset-mini)!: change pseudo sort and add no-merge #2425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To match tailwind's behavior as mentioned in #2416, unocss need to not merge the css output. The
noMerge
flag in generate() is non-breaking, but it may not be enough to address the issue. The second changes--which maybe breaking--is in the preset-mini, with alteringpseudoModifier
behavior, such that:sort
meta set:active
is still ahead of each modifier above (+10 each)This ordering (by itself) should not change how the css are generated since it will just change the order where they appear inside the comma separated selectors. But with the changes in
sort
value, it is a just in case breaking scenario just to be safe.The order of fn pseudo vs normal pseudo may be too much of a change, but if you really need to change the sort order, you may opt in to the
uno-layer-x
variant for better sort control.In short, previously:
after, with global noMerge: