Skip to content

feat(core): enhance raw css utils parse with apply variants#4889

Merged
zyyv merged 1 commit intomainfrom
raw-utils
Aug 19, 2025
Merged

feat(core): enhance raw css utils parse with apply variants#4889
zyyv merged 1 commit intomainfrom
raw-utils

Conversation

@zyyv
Copy link
Member

@zyyv zyyv commented Aug 19, 2025

UnoCSS will marked it as RawUtil in parsing, and it missed variants applied and its raw selectors.
e.g. hover:foo -> custom css body

rules: [
  [/^foo$/, ()=> ['custom css body']]
]

I wanted to enhance it in some way without affecting the original method, since it's already being used in the keyframe. Therefore, I chose to define a new key to customize our CSS, marking it as a normal CSSEntry for the next round of parsing.

@zyyv zyyv requested a review from antfu as a code owner August 19, 2025 08:12
@netlify
Copy link

netlify bot commented Aug 19, 2025

Deploy Preview for unocss ready!

Name Link
🔨 Latest commit d2514f4
🔍 Latest deploy log https://app.netlify.com/projects/unocss/deploys/68a4320def963a0008dcc5df
😎 Deploy Preview https://deploy-preview-4889--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 project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 19, 2025

Open in StackBlitz

commit: d2514f4

@zyyv zyyv merged commit e91d1c2 into main Aug 19, 2025
12 checks passed
@zyyv zyyv deleted the raw-utils branch August 19, 2025 08:24
@Jungzl
Copy link
Member

Jungzl commented Aug 20, 2025

the document needs to be updated.

@zyyv
Copy link
Member Author

zyyv commented Aug 20, 2025

the document needs to be updated.

Yes, I found that our docs have not updated some practical advanced usages in a timely manner. I will update the documentation after I complete the next PR.

This was referenced Aug 31, 2025
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.

2 participants