feat(preset-wind4): custom property output backup#4950
Merged
Conversation
✅ Deploy Preview for unocss ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
commit: |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces customizable property output configuration for the preset-wind4 package, allowing users to control how CSS custom properties are generated and wrapped. The changes replace the hardcoded property generation with a flexible configuration system.
- Adds configurable
propertyoption to preset options with customizable parent selector and CSS selector - Refactors property generation from hardcoded implementation to configurable system
- Updates test suite to remove async/await from synchronous snapshot tests
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages-presets/preset-wind4/src/index.ts | Adds property configuration interface and removes hardcoded preflight theme setup |
| packages-presets/preset-wind4/src/preflights/property.ts | New configurable property preflight implementation replacing the old hardcoded version |
| packages-presets/preset-wind4/src/preflights/properties.ts | Removes old hardcoded property preflight implementation |
| packages-presets/preset-wind4/src/preflights/index.ts | Updates import to use new configurable property function |
| packages-presets/preset-wind4/src/preflights/theme.ts | Moves theme configuration logic from main index file |
| test/preset-wind4.test.ts | Removes unnecessary async/await from synchronous tests and adds test for custom property configuration |
| docs/presets/wind4.md | Adds comprehensive documentation for the new property configuration options |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This was referenced Oct 15, 2025
4 tasks
1 task
This was referenced Oct 20, 2025
This was referenced Oct 28, 2025
This was referenced Nov 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #4941
📋 Summary
This PR adds configuration options to customize the
@propertyCSS rules generation in thepropertieslayer, providing users with more flexibility to control how CSS custom properties are output.✨ What's New
Added
preflights.propertyconfiguration with two customizable options:parentstring | false | undefinedfalseto remove wrapper entirely.selectorstring | undefined💡 Usage Examples
Enable with Default Configuration
Customize Parent and Selector
Remove Parent Wrapper
Disable Property Preflight
🔄 Output Comparison
Default Output (with
@supportswrapper):With
parent: false: