Skip to content

feat: add Luma visual style support#1745

Closed
rogelioRuiz wants to merge 1 commit intounovue:devfrom
rogelioRuiz:feat/add-luma-style
Closed

feat: add Luma visual style support#1745
rogelioRuiz wants to merge 1 commit intounovue:devfrom
rogelioRuiz:feat/add-luma-style

Conversation

@rogelioRuiz
Copy link
Copy Markdown
Contributor

@rogelioRuiz rogelioRuiz commented Apr 1, 2026

Summary

  • Ports the new Luma visual style ("Fluid, luminous, and glassy") from upstream shadcn/ui v4.1.2 (PR feat: luma shadcn-ui/ui#10246) to shadcn-vue
  • Adds style-luma.css (1325 lines) adapted from the upstream React implementation with Vue-specific syntax adjustments (ring-[3px], data-[inset], selector patterns, etc.)
  • Registers Luma across CLI constants, config, transform mappings, app styles, and presets
  • Adds CLI class transform mappings for Luma's fluid border-radius (rounded-smrounded-xl, rounded-mdrounded-2xl, rounded-lg/rounded-xlrounded-3xl)

Changes

  • New file: apps/v4/registry/styles/style-luma.css — full component styling
  • CLI: constants.ts (STYLES + PRESETS), config.ts (VISUAL_STYLES), transform-style.ts (class mappings)
  • App: styles.ts (metadata + icon), config.ts (preset), main.css (import + custom variant)
  • Tests: Updated registry-api, registry-config, and transform-style tests

Test plan

  • All 409 CLI tests pass (pnpm test)
  • Visual verification in dev server with Luma selected in style picker
  • Style switching between Luma and other styles works without CSS conflicts

Summary by CodeRabbit

  • New Features
    • Introduced a new "Luma" visual style featuring fluid, luminous, and glassy aesthetics for comprehensive UI component styling.
    • Added a new "reka-luma" preset combining Reka base, Luma styling, Lucide icons, and Inter typography.

Ports the Luma style ("Fluid, luminous, and glassy") from upstream
shadcn/ui v4.1.2 to shadcn-vue. Adds style-luma.css with Vue-specific
adaptations, CLI class transform mappings, style/preset registrations,
and corresponding test coverage.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 2026

📝 Walkthrough

Walkthrough

A new visual style called "luma" is being introduced across the v4 application and CLI tools, including CSS styling definitions, registry configuration entries, preset definitions, style transformation mappings, and corresponding test coverage for both the application and CLI packages.

Changes

Cohort / File(s) Summary
CSS & Theme Integration
apps/v4/assets/css/main.css, apps/v4/registry/styles/style-luma.css
Added theme import and custom variant for style-luma in main.css; created new comprehensive CSS styling file with 1,325 lines of component styles scoped under .style-luma, including slider, button, input, form, dialog, menu, and other UI component utilities with stateful variants and dark-mode adjustments.
Registry Configuration
apps/v4/registry/config.ts, packages/cli/src/registry/config.ts
Added reka-luma preset to v4 configuration; extended VISUAL_STYLES in CLI to recognize "luma" as a visual style for fallback registry mapping.
Style Definition & Constants
apps/v4/registry/styles.ts, packages/cli/src/registry/constants.ts
Added luma style entry with title, description ("Fluid, luminous, and glassy."), and SVG icon in v4; added corresponding luma style and reka-luma preset entries in CLI constants with shared configuration values.
Transform Utilities
packages/cli/src/utils/transformers/transform-style.ts
Added luma entry to STYLE_CLASS_MAPPINGS defining border-radius class remappings (rounded-sm/md/lg/xlrounded-2xl/3xl).
Test Updates
packages/cli/test/utils/registry-api.test.ts, packages/cli/test/utils/registry-config.test.ts, packages/cli/test/utils/transform-style.test.ts
Added test assertions for luma style retrieval, reka-luma preset retrieval, fallback style resolution, and border-radius transformation validation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A luminous style hops into view,
With glassy charm and a radiant hue,
Presets configured, CSS so bright,
Border-radius mapped just right,
The luma theme makes components delight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add Luma visual style support' directly and accurately summarizes the main change: adding a new visual style called Luma to the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/cli/src/registry/config.ts (1)

14-17: Update the JSDoc comment to include all visual styles.

The comment on line 16 lists (vega, nova, maia, lyra, mira) but doesn't include the newly added luma. Consider updating this to reflect all current visual styles for maintainability.

📝 Suggested comment update
 /**
  * Resolves the registry style to use for fetching components.
- * Visual styles (vega, nova, maia, lyra, mira) are mapped to new-york-v4.
+ * Visual styles (vega, nova, maia, lyra, mira, luma) are mapped to new-york-v4.
  * The original style is preserved in config for applying transformations.
  */
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/registry/config.ts` around lines 14 - 17, Update the JSDoc
on the registry style resolver to list all visual styles including the newly
added "luma" so the comment matches current behavior; edit the comment block
above the resolver (the JSDoc that mentions visual styles such as vega, nova,
maia, lyra, mira) to include "luma" alongside those names and ensure it still
explains that these visual styles map to new-york-v4 and the original style is
preserved in config.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/v4/registry/styles/style-luma.css`:
- Around line 1322-1324: Replace the invalid Tailwind utility before:-z-1 inside
the .cn-menu-translucent rule with a valid arbitrary z-index value (e.g.,
before:z-[-1]) so the pseudo-element gets z-index: -1; update the class
definition where before:-z-1 appears to use before:z-[-1] (or another supported
arbitrary value) to restore the translucent layer stacking.

---

Nitpick comments:
In `@packages/cli/src/registry/config.ts`:
- Around line 14-17: Update the JSDoc on the registry style resolver to list all
visual styles including the newly added "luma" so the comment matches current
behavior; edit the comment block above the resolver (the JSDoc that mentions
visual styles such as vega, nova, maia, lyra, mira) to include "luma" alongside
those names and ensure it still explains that these visual styles map to
new-york-v4 and the original style is preserved in config.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 71d37935-dff6-4e9a-8b4b-4ad297ff4929

📥 Commits

Reviewing files that changed from the base of the PR and between 5187a30 and bb1bd72.

📒 Files selected for processing (10)
  • apps/v4/assets/css/main.css
  • apps/v4/registry/config.ts
  • apps/v4/registry/styles.ts
  • apps/v4/registry/styles/style-luma.css
  • packages/cli/src/registry/config.ts
  • packages/cli/src/registry/constants.ts
  • packages/cli/src/utils/transformers/transform-style.ts
  • packages/cli/test/utils/registry-api.test.ts
  • packages/cli/test/utils/registry-config.test.ts
  • packages/cli/test/utils/transform-style.test.ts

Comment on lines +1322 to +1324
.cn-menu-translucent {
@apply animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether z-index "1" is configured and whether the repo uses alternate negative z-index syntax.

echo "== Tailwind dependency versions =="
rg -n --iglob 'package.json' '"tailwindcss"\s*:'

echo
echo "== Tailwind config zIndex definitions =="
fd -i 'tailwind.config.*' | xargs -r rg -n 'zIndex|z-index' -C3

echo
echo "== Existing negative z-index class patterns in repo =="
rg -n --iglob '*.{css,ts,js,mjs,cjs,vue}' '(-z-1|z-\[-1\]|-z-\[1\])' -C2

Repository: unovue/shadcn-vue

Length of output: 4872


🏁 Script executed:

# Check Tailwind 4.1.17 documentation/behavior for z-index scale
# First, verify if there's a custom tailwind config extending zIndex
find . -name 'tailwind.config.*' -o -name 'tailwind.ts' | head -20

Repository: unovue/shadcn-vue

Length of output: 340


🌐 Web query:

Tailwind CSS 4.1.17 z-index default scale and negative z-index utilities support

💡 Result:

In Tailwind CSS 4.1.17, the default z-index scale consists of z-0 (0), z-10 (10), z-20 (20), z-30 (30), z-40 (40), z-50 (50), and z-auto (auto). Negative z-index utilities are fully supported using the syntax -z-{value}, such as -z-10 for z-index: -10, -z-20 for -20, up to -z-50 for -50. This applies to positioned elements (relative, absolute, fixed, or sticky) and works consistently across v4.x versions, including minor releases like 4.1.17 which contain no z-index changes per changelog.

Citations:


🏁 Script executed:

# Check if apps/v4 has a tailwind config with custom zIndex
find apps/v4 -name 'tailwind.config.*' -type f

Repository: unovue/shadcn-vue

Length of output: 43


🏁 Script executed:

# Check for existing arbitrary value syntax patterns in style-luma.css and other CSS files
rg 'z-\[' apps/v4/registry/styles/ -n

Repository: unovue/shadcn-vue

Length of output: 43


🏁 Script executed:

# Check if arbitrary value syntax is used elsewhere in the CSS files
rg '@apply.*\[' apps/v4/registry/styles/style-luma.css -n | head -20

Repository: unovue/shadcn-vue

Length of output: 5771


Tailwind utility before:-z-1 at line 1323 is invalid and will be silently ignored.

The z-index scale in Tailwind 4.1.17 only includes 0, 10, 20, 30, 40, 50, and auto—-z-1 is not supported. The pseudo-element's stacking context will fall back to z-index: auto, breaking the translucent layer effect. Use the arbitrary value syntax instead:

Fix
-    `@apply` animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!;
+    `@apply` animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:z-[-1] before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.cn-menu-translucent {
@apply animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!;
}
.cn-menu-translucent {
`@apply` animate-none! relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:z-[-1] before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!;
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/v4/registry/styles/style-luma.css` around lines 1322 - 1324, Replace the
invalid Tailwind utility before:-z-1 inside the .cn-menu-translucent rule with a
valid arbitrary z-index value (e.g., before:z-[-1]) so the pseudo-element gets
z-index: -1; update the class definition where before:-z-1 appears to use
before:z-[-1] (or another supported arbitrary value) to restore the translucent
layer stacking.

@rogelioRuiz
Copy link
Copy Markdown
Contributor Author

Closing in favor of a new PR with additional fixes for the CLI resolver and style transform.

@rogelioRuiz rogelioRuiz closed this Apr 2, 2026
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.

1 participant