*:last: and last:*: shouldn't be the same
Author: jods4Created Jan 6, 2026Updated Jun 17, 2026
Labelsbugpreset-minicorepreset-wind4
UnoCSS version
66.5.12
Describe the bug
It looks like the order of combining multiple variants is not always respected.
My repro tries *:last:_ and last:*:_ and both results in the same selector and the same visual output.
I expect the first to generate _ > *:last-child and the second _:last-child > *.
This is incompatible with Tailwind, which applies those as I describe. I provide a Tailwind playground for comparison.
Related? Issue #4962 looks similar, although the syntax used to target children is different and according to comments that bug was fixed.
Reproduction
Here's a UnoCSS playground.
Note that red and green cells are the same, although they shouldn't. Please check Tailwind Playground above to see the visually correct result.
System Info
See UnoCSS Playground
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Source: unocss/unocss