Skip to content

refactor: use shadcn standard css variables#32

Merged
Shunseii merged 1 commit intomainfrom
refactor/standard-tailwind-theme
Dec 28, 2025
Merged

refactor: use shadcn standard css variables#32
Shunseii merged 1 commit intomainfrom
refactor/standard-tailwind-theme

Conversation

@Shunseii
Copy link
Copy Markdown
Owner

@Shunseii Shunseii commented Dec 28, 2025

Summary by CodeRabbit

  • Style

    • Updated global typography, prose token names, and applied a primary font across the app.
    • Adjusted global outline/border utilities for improved focus styling.
  • Refactor

    • Consolidated and renamed color variables across the design system; moved radius defaults into the theme.
    • Improved mobile safe-area handling for more reliable layout insets.
  • Chores / Docs

    • Normalized local dev ports and updated related docs and examples.

✏️ Tip: You can customize this high-level summary in your review settings.

@Shunseii Shunseii self-assigned this Dec 28, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 28, 2025

📝 Walkthrough

Walkthrough

Refactors CSS design tokens (--color-* → shorter tokens), updates global/prose styles, adjusts dev server port flags, removes inline body color writes and "use strict" from web index, and adds SafeAreaListener + Uniwind integration in the mobile layout to propagate insets.

Changes

Cohort / File(s) Summary
Port configuration
Makefile, apps/web/package.json, CLAUDE.md, apps/web/README.md
Removed explicit --port 4000 from Makefile serve target; apps/web/package.json wrangler:dev now uses --port 5173; docs updated to reflect port change.
Design system token renames
packages/design-system/colors.css, packages/design-system/globals.css
Renamed --color-* variables to shorter tokens (--background, --foreground, --card, --border, etc.), added chart/sidebar/success/warning tokens, and moved --radius into the @theme block.
Marketing global styles / prose token updates
apps/marketing/src/styles/global.css
Removed Tailwind @import and the @theme block; replaced old token references with new token names (e.g., var(--foreground), var(--primary), var(--muted-foreground)).
Web global styles
apps/web/src/globals.css
Added global font-primary usage, adjusted universal border/outline utilities, and ensured font-primary applies at html/body level.
HTML script cleanup
apps/web/index.html
Removed "use strict" and eliminated direct document.body.style.backgroundColor assignments in color-scheme initialization script.
Mobile safe-area / insets handling
apps/mobile/src/app/_layout.tsx
Replaced nested UI wrapper with SafeAreaListener that updates Uniwind insets; preserves SafeAreaProvider, ThemeProvider, I18nProvider, Stack, and StatusBar.

Sequence Diagram(s)

sequenceDiagram
  participant SafeAreaProvider as SafeAreaProvider
  participant SafeAreaListener as SafeAreaListener
  participant Uniwind as Uniwind
  participant Theme as ThemeProvider
  participant App as App UI

  Note over SafeAreaProvider,App: Mobile app init
  SafeAreaProvider->>SafeAreaListener: emit insets (initial & changes)
  SafeAreaListener->>Uniwind: setInsets(newInsets)
  Uniwind->>Theme: update inset tokens/vars
  Theme->>App: render with updated spacing/vars
  Note right of App: I18nProvider, Stack, StatusBar preserved
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through tokens, names made neat,

ports nudged, a script made light and fleet.
SafeArea listens, Uniwind shares the cheer,
colors trimmed, layouts snug and clear,
a rabbit’s wink — tidy changes near 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the pull request—refactoring to use shadcn standard CSS variables. Changes across multiple files consistently rename old color tokens (--color-*) to standard shadcn tokens (--foreground, --background, --primary, etc.).
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/standard-tailwind-theme

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.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Dec 28, 2025

Deploying bahar with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0447428
Status: ✅  Deploy successful!
Preview URL: https://fc7b33ee.bahar-5xu.pages.dev
Branch Preview URL: https://refactor-standard-tailwind-t.bahar-5xu.pages.dev

View logs

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)
apps/web/src/globals.css (1)

10-15: Consider redundant font-primary application.

The font-primary utility is applied to both html and body elements. Since body inherits from html, applying it to html alone should suffice. However, this redundancy is harmless and may be intentional for specificity.

Optional simplification
  body {
-   @apply font-primary bg-background text-foreground;
+   @apply bg-background text-foreground;
  }
  html {
    @apply font-primary;
  }
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a82bdc5 and 3c84be1.

📒 Files selected for processing (7)
  • Makefile
  • apps/marketing/src/styles/global.css
  • apps/web/index.html
  • apps/web/package.json
  • apps/web/src/globals.css
  • packages/design-system/colors.css
  • packages/design-system/globals.css
💤 Files with no reviewable changes (1)
  • apps/web/index.html
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-12-27T05:56:33.043Z
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.043Z
Learning: Applies to apps/web/**/*.{tsx,jsx} : Web app uses Shadcn/UI components and Tailwind CSS v4 for styling; use the `cn()` utility function for combining and conditionally applying Tailwind classes

Applied to files:

  • apps/web/src/globals.css
  • apps/marketing/src/styles/global.css
📚 Learning: 2025-12-27T05:56:33.043Z
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.043Z
Learning: Applies to apps/mobile/**/*.{tsx,jsx} : Mobile app uses UniWind (Tailwind for React Native) with Tailwind CSS v4

Applied to files:

  • apps/marketing/src/styles/global.css
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: bahar-marketing
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (9)
Makefile (1)

7-7: LGTM! Simplified command delegation.

Removing the port override simplifies the Makefile and delegates configuration to the package.json script definition. This is a cleaner separation of concerns.

packages/design-system/colors.css (2)

46-85: Verify dark mode token parity.

The dark theme mappings look correct. All tokens have corresponding dark variants with appropriate OKLCH values for dark mode.


6-44: Migration is incomplete—mobile app still depends on old --color-* tokens.

The design system's refactor to new token naming in packages/design-system/colors.css is clean, but this change has not been applied throughout the codebase. The mobile app continues to define and use --color-* tokens directly in apps/mobile/src/global.css (lines 25-73) and references them in apps/mobile/src/lib/theme.ts and apps/mobile/src/app/(auth)/code/[email].tsx. Update these files to use the new design system tokens to complete the migration.

⛔ Skipped due to learnings
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/mobile/**/*.{tsx,jsx} : Mobile app uses UniWind (Tailwind for React Native) with Tailwind CSS v4
Learnt from: Shunseii
Repo: Shunseii/bahar PR: 24
File: apps/web/src/components/features/decks/DeckDialogContent.tsx:195-201
Timestamp: 2025-11-27T06:02:25.941Z
Learning: In apps/web/src/components/features/decks/DeckDialogContent.tsx, the backend API calls (trpc.decks.create and trpc.decks.update) are temporary and planned to be removed after migration is complete.
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/web/**/*.{tsx,jsx} : Web app uses Shadcn/UI components and Tailwind CSS v4 for styling; use the `cn()` utility function for combining and conditionally applying Tailwind classes
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/mobile/**/*.{tsx,jsx} : Mobile app uses Expo with file-based routing (Expo Router)
packages/design-system/globals.css (2)

9-9: Good consolidation of theme tokens.

Moving --radius into the @theme block consolidates all design tokens in one place, which is cleaner than the previous split between @theme and :root.


12-42: Mapping completeness verified: all base color tokens are correctly mapped.

All 32 base tokens from colors.css have corresponding --color- prefixed mappings in globals.css. The chart tokens (--chart-1 through --chart-5) are intentionally not mapped here, which is correct since they serve a different purpose outside the Tailwind color utility layer.

apps/web/src/globals.css (1)

8-8: Correct Tailwind v4 opacity syntax.

The /50 syntax for opacity is the correct Tailwind v4 approach, replacing the old outline-opacity-50 utility.

apps/marketing/src/styles/global.css (3)

11-13: LGTM! Clean migration to new token names.

The body styles correctly reference the new token names (--font-primary, --background, --foreground), aligning with the design system refactor.


67-83: Prose token mappings correctly updated.

All Tailwind Typography prose variables have been migrated to the new token names. The mappings are complete and consistent.


18-64: View transitions are well-supported across modern browsers as of December 2025.

Same-document View Transitions (used here) are now Baseline across Chrome 111+, Edge 111+, Safari 18+, and Firefox 144+ (Oct 2025). The CSS is properly scoped with fade animations, respects prefers-reduced-motion for accessibility, and the selective disabling of transitions for header/footer is good UX. Consider adding feature detection ('startViewTransition' in document) for graceful fallbacks in environments where the API isn't available.

Comment thread apps/web/package.json
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Dec 28, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bahar-marketing 0447428 Commit Preview URL Dec 28 2025, 07:11 PM

@Shunseii Shunseii force-pushed the refactor/standard-tailwind-theme branch from 3c84be1 to 629e29f Compare December 28, 2025 19:05
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: 0

🧹 Nitpick comments (1)
apps/web/src/globals.css (1)

11-15: Remove redundant font-primary declaration.

The font-primary utility is applied to both html and body. Since body inherits from html, applying it to both is redundant.

🔎 Suggested simplification
  body {
-   @apply font-primary bg-background text-foreground;
+   @apply bg-background text-foreground;
  }
  html {
    @apply font-primary;
  }
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3c84be1 and 629e29f.

📒 Files selected for processing (8)
  • Makefile
  • apps/marketing/src/styles/global.css
  • apps/mobile/src/app/_layout.tsx
  • apps/web/index.html
  • apps/web/package.json
  • apps/web/src/globals.css
  • packages/design-system/colors.css
  • packages/design-system/globals.css
💤 Files with no reviewable changes (1)
  • apps/web/index.html
🚧 Files skipped from review as they are similar to previous changes (2)
  • Makefile
  • apps/web/package.json
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Use TypeScript with strict typing across entire codebase; do not use any type unless absolutely necessary
Use DisplayError class for user-friendly error messages and Result<T, E> type for explicit error handling with Rust-like pattern
Use Drizzle ORM for database operations across all database interactions

Files:

  • apps/mobile/src/app/_layout.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx}: Write self-documenting code and avoid overuse of comments
Error handling with try/catch blocks and structured error types
Component naming: use PascalCase for components, camelCase for functions/variables

Files:

  • apps/mobile/src/app/_layout.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{tsx,jsx}: React components use functional style with hooks
Prefer using Jotai atoms over React Context
State management: use Tanstack Query for async state and Jotai for atomic state

Files:

  • apps/mobile/src/app/_layout.tsx
apps/mobile/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

apps/mobile/**/*.{tsx,jsx}: Mobile app uses UniWind (Tailwind for React Native) with Tailwind CSS v4
Mobile app uses Expo with file-based routing (Expo Router)

Files:

  • apps/mobile/src/app/_layout.tsx
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/mobile/**/*.{tsx,jsx} : Mobile app uses UniWind (Tailwind for React Native) with Tailwind CSS v4
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/web/**/*.{tsx,jsx} : Web app uses Shadcn/UI components and Tailwind CSS v4 for styling; use the `cn()` utility function for combining and conditionally applying Tailwind classes
📚 Learning: 2025-12-27T05:56:33.053Z
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/mobile/**/*.{tsx,jsx} : Mobile app uses UniWind (Tailwind for React Native) with Tailwind CSS v4

Applied to files:

  • apps/mobile/src/app/_layout.tsx
  • apps/web/src/globals.css
  • apps/marketing/src/styles/global.css
📚 Learning: 2025-12-27T05:56:33.053Z
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to **/*.{tsx,jsx} : Prefer using Jotai atoms over React Context

Applied to files:

  • apps/mobile/src/app/_layout.tsx
📚 Learning: 2025-12-27T05:56:33.053Z
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/web/**/*.{tsx,jsx} : Web app uses Shadcn/UI components and Tailwind CSS v4 for styling; use the `cn()` utility function for combining and conditionally applying Tailwind classes

Applied to files:

  • apps/web/src/globals.css
  • apps/marketing/src/styles/global.css
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: bahar-marketing
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (9)
packages/design-system/colors.css (2)

6-44: LGTM! Clean token standardization.

The color token renaming from --color-* to shorter names is systematic and consistent. The addition of chart, sidebar, and extra color tokens expands the design system appropriately.


46-85: LGTM! Dark theme tokens properly updated.

The dark theme block correctly mirrors the light theme structure with appropriate dark mode color values. All new tokens (charts, sidebar, extras) are included.

apps/web/src/globals.css (1)

8-8: Verify the universal outline styling.

Applying outline-ring/50 to all elements (*) is unusual and may produce unintended visual effects throughout the application. Outlines are typically applied selectively for focus states or specific interactive elements.

Please confirm this is intentional and test across various components to ensure no visual regressions.

apps/marketing/src/styles/global.css (2)

11-13: LGTM! Typography tokens properly updated.

The body styles correctly reference the new token naming convention (--font-primary, --background, --foreground).


68-82: LGTM! Prose tokens consistently migrated.

All prose styling variables have been systematically updated to use the new shorter token names, maintaining consistency with the broader design system refactor.

packages/design-system/globals.css (2)

9-9: LGTM! Better token organization.

Moving --radius into the @theme block consolidates all theme-level tokens in one location.


12-42: LGTM! Smart backward compatibility strategy.

The mapping layer (--color-*: var(--*)) provides backward compatibility while migrating to shorter token names. This allows consuming code to use either naming convention during the transition period, reducing breaking changes.

The addition of all new sidebar tokens ensures complete coverage of the expanded design system.

apps/mobile/src/app/_layout.tsx (2)

29-32: LGTM! Clean imports for SafeAreaListener and Uniwind integration.

The imports are correctly structured to support the new inset synchronization feature.

Also applies to: 38-38


94-129: LGTM! Correctly wraps existing structure with SafeAreaListener.

The nested structure properly integrates SafeAreaListener while preserving all existing providers, navigation configuration, and StatusBar setup. The className usage on the View component is appropriate for UniWind.

@Shunseii Shunseii force-pushed the refactor/standard-tailwind-theme branch from 629e29f to 0447428 Compare December 28, 2025 19:09
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

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 629e29f and 0447428.

📒 Files selected for processing (10)
  • CLAUDE.md
  • Makefile
  • apps/marketing/src/styles/global.css
  • apps/mobile/src/app/_layout.tsx
  • apps/web/README.md
  • apps/web/index.html
  • apps/web/package.json
  • apps/web/src/globals.css
  • packages/design-system/colors.css
  • packages/design-system/globals.css
💤 Files with no reviewable changes (1)
  • apps/web/index.html
🚧 Files skipped from review as they are similar to previous changes (6)
  • packages/design-system/globals.css
  • apps/mobile/src/app/_layout.tsx
  • apps/web/src/globals.css
  • apps/marketing/src/styles/global.css
  • Makefile
  • apps/web/package.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/mobile/**/*.{tsx,jsx} : Mobile app uses UniWind (Tailwind for React Native) with Tailwind CSS v4
Learnt from: CR
Repo: Shunseii/bahar PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-27T05:56:33.053Z
Learning: Applies to apps/web/**/*.{tsx,jsx} : Web app uses Shadcn/UI components and Tailwind CSS v4 for styling; use the `cn()` utility function for combining and conditionally applying Tailwind classes
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: bahar-marketing
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
CLAUDE.md (1)

64-65: Port documentation updated correctly, but summary mentions substantial code changes not shown in provided files.

The port change (4000 → 5173) is properly documented. However, the AI summary references CSS token refactoring, global style updates, inline body color removal, and SafeAreaListener integration—none of which appear in the two documentation files provided. Please confirm whether the full PR scope includes additional files with those code changes.

apps/web/README.md (1)

25-25: Documentation updated consistently with CLAUDE.md.

The port change is correctly reflected here and aligns with the parallel update in CLAUDE.md. Both documentation files now reference port 5173 consistently.

packages/design-system/colors.css (1)

46-85: LGTM! Dark theme implementation is consistent and semantically correct.

The dark theme tokens mirror the light theme structure perfectly, with appropriately inverted color values (dark background, light foreground). All shadcn/ui standard tokens are present, including the chart, sidebar, and extra semantic colors.

Comment on lines 5 to 44
:root {
--color-background: oklch(100% 0 0);
--color-foreground: oklch(14% 0.03 265);
--color-card: oklch(100% 0 0);
--color-card-foreground: oklch(14% 0.03 265);
--color-popover: oklch(100% 0 0);
--color-popover-foreground: oklch(14% 0.03 265);
--color-primary: oklch(56% 0.2 263);
--color-primary-foreground: oklch(98.5% 0.01 248);
--color-secondary: oklch(97% 0.014 248);
--color-secondary-foreground: oklch(21% 0.03 265);
--color-muted: oklch(97% 0.014 248);
--color-muted-foreground: oklch(52% 0.04 255);
--color-accent: oklch(97% 0.014 248);
--color-accent-foreground: oklch(21% 0.03 265);
--color-destructive: oklch(64% 0.21 27);
--color-destructive-foreground: oklch(98.5% 0.01 248);
--color-success: oklch(52% 0.14 151);
--color-success-foreground: oklch(98.5% 0.01 248);
--color-warning: oklch(69% 0.18 41);
--color-warning-foreground: oklch(21% 0.03 265);
--color-border: oklch(92% 0.02 253);
--color-input: oklch(92% 0.02 253);
--color-ring: oklch(56% 0.2 263);
--background: oklch(100% 0 0);
--foreground: oklch(14% 0.03 265);
--card: oklch(100% 0 0);
--card-foreground: oklch(14% 0.03 265);
--popover: oklch(100% 0 0);
--popover-foreground: oklch(14% 0.03 265);
--primary: oklch(56% 0.2 263);
--primary-foreground: oklch(98.5% 0.01 248);
--secondary: oklch(97% 0.014 248);
--secondary-foreground: oklch(21% 0.03 265);
--muted: oklch(97% 0.014 248);
--muted-foreground: oklch(52% 0.04 255);
--accent: oklch(97% 0.014 248);
--accent-foreground: oklch(21% 0.03 265);
--destructive: oklch(64% 0.21 27);
--destructive-foreground: oklch(98.5% 0.01 248);
--border: oklch(92% 0.02 253);
--input: oklch(92% 0.02 253);
--ring: oklch(56% 0.2 263);
--chart-1: oklch(0.8241 0.1251 84.4866);
--chart-2: oklch(0.8006 0.1116 203.6044);
--chart-3: oklch(0.4198 0.1693 266.7798);
--chart-4: oklch(0.9214 0.0762 125.5777);
--chart-5: oklch(0.9151 0.1032 116.1913);
--sidebar: oklch(0.9886 0 0);
--sidebar-foreground: oklch(0.26 0.04 259);
--sidebar-primary: oklch(0.33 0.06 259);
--sidebar-primary-foreground: oklch(0.9886 0 0);
--sidebar-accent: oklch(0.96 0.008 259);
--sidebar-accent-foreground: oklch(0.3261 0 0);
--sidebar-border: oklch(0.92 0.025 259);
--sidebar-ring: oklch(0.7716 0 0);

/* Extra colors */
--success: oklch(52% 0.14 151);
--success-foreground: oklch(98.5% 0.01 248);
--warning: oklch(69% 0.18 41);
--warning-foreground: oklch(21% 0.03 265);
}
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:

# First, let's check if the file exists and get its full content
cat -n packages/design-system/colors.css | head -100

Repository: Shunseii/bahar

Length of output: 3677


🏁 Script executed:

# Search for old --color-* token references across the codebase
rg -n 'var\(--color-' --type=css --type=scss --type=sass

Repository: Shunseii/bahar

Length of output: 86


🏁 Script executed:

# Also search in JS/TS files for old token references
rg -n '\-\-color-' --type=ts --type=tsx --type=js --type=jsx

Repository: Shunseii/bahar

Length of output: 85


🏁 Script executed:

# Search for any CSS files that might reference old tokens
fd -e css -e scss -e sass | head -20

Repository: Shunseii/bahar

Length of output: 215


🏁 Script executed:

# Search for old --color-* token references with corrected syntax
rg '\-\-color-' -n

Repository: Shunseii/bahar

Length of output: 8518


🏁 Script executed:

# Check the globals.css file in design-system package
cat packages/design-system/globals.css

Repository: Shunseii/bahar

Length of output: 2591


🏁 Script executed:

# Check apps/web globals.css
cat apps/web/src/globals.css

Repository: Shunseii/bahar

Length of output: 389


🏁 Script executed:

# Search for any usage of old token names in all files
rg 'var\(' | grep '\-\-color-'

Repository: Shunseii/bahar

Length of output: 2575


Update apps/mobile to use centralized design-system colors.

The refactor to colors.css follows shadcn/ui conventions correctly, with proper OKLCH formatting and comprehensive token coverage. The design-system package includes a backward-compatibility layer in globals.css that maps legacy --color-* tokens to the new naming scheme.

However, the migration is incomplete. The apps/mobile/src/global.css file still defines duplicate color tokens with hardcoded values instead of referencing the centralized definitions from the design-system package. Similarly, apps/mobile/src/lib/theme.ts continues to reference --color-* tokens. This creates maintenance inconsistency across the monorepo.

Update apps/mobile to import and reference the design-system colors directly rather than maintaining separate duplicate definitions.

🤖 Prompt for AI Agents
In packages/design-system/colors.css around lines 5–44 you added centralized
OKLCH tokens but apps/mobile still defines duplicate hardcoded color tokens and
references legacy --color-* names; remove the duplicate declarations from
apps/mobile/src/global.css and instead import the design-system color CSS (or
ensure the design-system globals are included in the mobile build) so mobile
uses the centralized --primary, --background, etc.; then update
apps/mobile/src/lib/theme.ts to stop referencing hardcoded --color-* tokens and
consume the new token names (or rely on the backward-compatibility mappings
provided by design-system/globals.css), and finally remove any unused
mobile-specific color vars to avoid conflicting overrides and ensure the build
imports order loads design-system before app globals.

@Shunseii Shunseii merged commit c651297 into main Dec 28, 2025
3 checks passed
@Shunseii Shunseii deleted the refactor/standard-tailwind-theme branch December 28, 2025 19:33
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