Skip to content

chore(frontend): optimize tailwind v4 theme and move font variables t…#41

Merged
ivanskv2000 merged 2 commits into
mainfrom
chore/frontend-tailwind-v4-theme-optimization
May 12, 2026
Merged

chore(frontend): optimize tailwind v4 theme and move font variables t…#41
ivanskv2000 merged 2 commits into
mainfrom
chore/frontend-tailwind-v4-theme-optimization

Conversation

@ivanskv2000
Copy link
Copy Markdown
Owner

@ivanskv2000 ivanskv2000 commented May 12, 2026

Tailwind v4 Theme Optimization

Overview

This PR optimizes the frontend CSS layer by fully embracing the Tailwind CSS v4 "CSS-first" paradigm. Custom theme logic has been migrated from JS-style declarations into the main CSS entry point, and legacy Tailwind v3 compatibility hacks have been removed.

Changes

  • Variable Migration: Moved font family definitions (--font-sans, --font-handwritten) from :root into the @theme inline block in index.css.
  • Brand Alignment: Added --color-brand and --color-brand-foreground aliases to the Tailwind theme, mapping them to the primary brand colors for better semantic usage.
  • Clean Up:
    • Removed redundant manual .font-handwritten class declaration as it is now automatically handled by the Tailwind v4 theme engine.
    • Removed the @custom-variant dark hack, relying on Tailwind v4's native dark mode support.
  • Shadcn Integration: Refined the @theme block to ensure Shadcn-vue's CSS variables are properly integrated with the new Tailwind v4 engine, minimizing runtime overhead.

Verification

  • Verified that npm run lint passes.
  • Verified that npm run build completes successfully, confirming that Tailwind v4 correctly processes the updated index.css.

@sonarqubecloud
Copy link
Copy Markdown

@ivanskv2000 ivanskv2000 merged commit 4a7aac3 into main May 12, 2026
4 checks passed
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