Skip to content

feat(preset-wind4): support theme variable safelist#4730

Merged
zyyv merged 4 commits intomainfrom
theme-safelist
Jun 12, 2025
Merged

feat(preset-wind4): support theme variable safelist#4730
zyyv merged 4 commits intomainfrom
theme-safelist

Conversation

@zyyv
Copy link
Member

@zyyv zyyv commented Jun 11, 2025

close #4694

@zyyv zyyv requested a review from antfu as a code owner June 11, 2025 13:07
@netlify
Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for unocss ready!

Name Link
🔨 Latest commit 091ca29
🔍 Latest deploy log https://app.netlify.com/projects/unocss/deploys/684aac7df2a799000865972f
😎 Deploy Preview https://deploy-preview-4730--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.

@zyyv zyyv marked this pull request as draft June 11, 2025 13:07
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 11, 2025

Open in StackBlitz

commit: 091ca29

@zyyv zyyv marked this pull request as ready for review June 12, 2025 10:31
Comment on lines +345 to +357
safelist: [
'spacing',
'colors:red-100',
'breakpoint:sm',
({ theme }) => {
if ('custom' in theme) {
return [
'custom:foo',
]
}
return []
},
],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onmax You can continue add theme variables in safelist, it will be parsed only for presetWind4.

@zyyv zyyv merged commit 3689021 into main Jun 12, 2025
12 checks passed
@zyyv zyyv deleted the theme-safelist branch June 12, 2025 10:50
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.

Add safelist-like option for variables from the preset wind4

1 participant