Skip to content
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(variant-group): support left-side-group #3880

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Simon-He95
Copy link
Contributor

close: #2869

@Simon-He95 Simon-He95 requested a review from antfu as a code owner June 9, 2024 03:35
Copy link

netlify bot commented Jun 9, 2024

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3d85399
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/6665234a3ce6ef00080d9e08
😎 Deploy Preview https://deploy-preview-3880--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu
Copy link
Member

antfu commented Jun 11, 2024

Thanks for taking time working on it - but I am not sure if it's worth it to support this in tradeoff of Complexity, performance, as well as more surfaces to conflicts/false-positive with other syntaxes in the user code.

@antfu
Copy link
Member

antfu commented Jun 11, 2024

Oh, btw, the reason it's called variant group is that it applies to variants.

I still feel this is too risky for a little gain. In the linked issue, I guess it's probably better to improve the DX via shortcuts or variants.

@Simon-He95
Copy link
Contributor Author

Oh, btw, the reason it's called variant group is that it applies to variants.

I still feel this is too risky for a little gain. In the linked issue, I guess it's probably better to improve the DX via shortcuts or variants.

It is indeed very risky. I did not consider very complex scenarios, such as c2:(d1 d2):d3:a:(a b)
If we provide a base version, such as only processing (?:\s|^)\([\w\s-]+\)[:-]([\w-]+|\[[^\]]+\]), we point at (first second):xx and (first second):[] temporary
image

There will be better ways to support more complex situations in the future.

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.

variant-group: left-side group
2 participants