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
feat(core,presets)!: update presets to use the recursive callback #1127
Conversation
✅ Deploy Preview for unocss ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
I'd suggest we only rewrite those necessary. |
7a17ed6
to
e6582c7
Compare
Can you help resolving the conflicts? Thanks |
e6582c7
to
366a67b
Compare
@chu121su12 Thanks for your work on this. I was watching the changes in this PR and other related PRs and I was not really expecting this to be merged while snapshots are like that. This PR now removes the whole purpose of #987. I see this PR comes with some features to take more control over output. Having more features is nice, but it still seems a little bit incomplete. Why we shouldn't fix #1104The issue in #1104 is the consequence of the breaking change in #987. The point of #987 is applying variants in the same order as Tailwind to make migration as easy as possible. I don't understand why we are trying to fix #1104. The changes in #987 are not just about Input: <div class="checked:next:bg-red-50">
<div class="next:checked:bg-red-50"> Unocss output after #987 and before this PR .checked\:next\:bg-red-50 + *:checked
.next\:checked\:bg-red-50:checked + * Tailwind output Same as the above. I added .checked\:next\:bg-red-50 + *:checked
.next\:checked\:bg-red-50:checked + * Unocss output after this PR .checked\:next\:bg-red-50:checked + *
.next\:checked\:bg-red-50 + *:checked Now two same inputs have different outputs and behaviours between Unocss and Tailwind. We should revert this PR and suggest people to reverse their variants order. /cc @antfu |
My case for #1104 is that unocss syntax should follow the order of declaration, as in @sibbng To your point, this changes is done on |
Also, as this is not in the tailwind's core, I think it is on the same level as providing separate variant definition in unocss config. |
I see, let's better align with Tailwind in this case. I guess having inverse behavior for wind / mini would be quite confusing. Let's revert the order. @chu121su12 |
Follow up to #1126, this PR update the existing variants to use the introduced variant
handler()
.Closes #1104
This PR adds 2 extra properties on the handler. Variants that use selector sectioning (the one that uses
$$
: dark, rtl/ltr and group pseudo) are now moved intoprefix
so it can be modified selectively.unocss/packages/core/src/types.ts
Lines 193 to 204 in 91ea249