Conversation
📝 WalkthroughWalkthroughThis PR refactors the CSS generation pipeline from dynamically calling generator functions to pre-computed static constants, and introduces a new extra-utilities system. Generator functions for variants and insets are now internal, with their outputs exposed as exported CSS constants. A new extraUtilities module is added to support additional CSS utilities like Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/uniwind/src/css/extraUtilities.ts (1)
3-3: Minor note ontoKebabCaseedge cases.The current implementation handles simple camelCase well (e.g.,
borderCurve→border-curve). However, it doesn't handle consecutive uppercase letters correctly (e.g.,borderXYZwould becomeborder-x-y-zinstead of potentiallyborder-xyz). This is fine for the current use cases, but worth noting if more complex property names are added later.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/uniwind/src/css/extraUtilities.ts` at line 3, The toKebabCase function currently splits every uppercase letter individually (e.g., borderXYZ → border-x-y-z); update toKebabCase to treat consecutive uppercase letters as a single group so runs like "XYZ" become "-xyz" rather than "-x-y-z", and ensure a leading hyphen is not left if the input starts with an uppercase letter; locate the toKebabCase arrow function and replace its regex logic to group consecutive uppercase characters, lowercase the whole group, prepend a single hyphen, and trim any leading hyphen from the final result.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/uniwind/src/css/extraUtilities.ts`:
- Line 3: The toKebabCase function currently splits every uppercase letter
individually (e.g., borderXYZ → border-x-y-z); update toKebabCase to treat
consecutive uppercase letters as a single group so runs like "XYZ" become "-xyz"
rather than "-x-y-z", and ensure a leading hyphen is not left if the input
starts with an uppercase letter; locate the toKebabCase arrow function and
replace its regex logic to group consecutive uppercase characters, lowercase the
whole group, prepend a single hyphen, and trim any leading hyphen from the final
result.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0c1f5776-7287-4beb-a0dc-a8c9006afd41
📒 Files selected for processing (7)
packages/uniwind/src/css/extraUtilities.tspackages/uniwind/src/css/index.tspackages/uniwind/src/css/insets.tspackages/uniwind/src/css/overwrite.tspackages/uniwind/src/css/variants.tspackages/uniwind/tests/native/styles-parsing/borders.test.tsxpackages/uniwind/uniwind.css
|
🚀 This pull request is included in v1.6.0. See Release v1.6.0 for release notes. |
#430
Summary by CodeRabbit
New Features
border-continuousCSS utility class for styling elements with continuous border curves.Tests
border-continuousutility to ensure proper functionality.