refactor: unify UnoCSS config with shared tokens#208
Merged
Conversation
Extract shared base semantic tokens (colors, borders, glass effects) from webcomponents config into a reusable `sharedShortcuts` constant in packages/ui. This allows Wind3 (webcomponents) and Wind4 (Nuxt UIs) to share the same visual identity tokens while maintaining their respective preset requirements. Consolidate global CSS across packages into a shared base (packages/ui/src/styles/global.css) to eliminate duplication. Each package imports the shared base and only defines its own-specific styles. Fix packages/vite to use CSS variables for scrollbar colors, aligning it with rolldown and self-inspect. Align all base shortcuts to webcomponents canonical values for consistency: color-base neutral-200, border-base #8882, bg-glass opacity:50/blur-7. Changes: - Create shared-shortcuts.ts with base semantic tokens - Create shared global.css with common styles (reset, scrollbar, bg-dots) - Update all uno.config files to import shared tokens - Simplify package-specific global.css files - Add exports in package.json for new modules - Add clarifying comment on getHashColorFromString divergence No visual changes. All tests pass. Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-rolldown
@vitejs/devtools-rpc
@vitejs/devtools-self-inspect
commit: |
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.
Description
Extract shared UnoCSS base semantic tokens into a reusable
sharedShortcutsconstant in packages/ui, enabling Wind3 (webcomponents) and Wind4 (Nuxt UIs) to share the same visual identity tokens while maintaining their respective preset requirements.Consolidate duplicate global CSS across packages into
packages/ui/src/styles/global.css. Each package now imports the shared base and only defines its own specific styles. Fix packages/vite to use CSS variables for scrollbar colors, aligning it with rolldown and self-inspect.Align all base shortcuts to webcomponents canonical values:
color-base: neutral-200,border-base: #8882,bg-glass: opacity:50/blur-7. Add clarifying comment explaining thegetHashColorFromStringdivergence between webcomponents and UI packages.Linked Issues
None
Additional context