Skip to content

Refactor theme tokens: add surfaceGlass and standardize breakpoints#767

Open
marcodejongh wants to merge 1 commit intomainfrom
claude/use-theme-constants-Ct2rN
Open

Refactor theme tokens: add surfaceGlass and standardize breakpoints#767
marcodejongh wants to merge 1 commit intomainfrom
claude/use-theme-constants-Ct2rN

Conversation

@marcodejongh
Copy link
Owner

Summary

This PR improves theme consistency and maintainability by extracting hardcoded values into centralized theme tokens. Specifically, it adds a new surfaceGlass semantic color for frosted glass effects and introduces a standardized breakpoints object for responsive design.

Key Changes

  • Added surfaceGlass semantic color: New theme token rgba(255, 255, 255, 0.3) for frosted glass effect backgrounds, replacing hardcoded values
  • Standardized breakpoints: Introduced themeTokens.breakpoints.mobile (768px) as a single source of truth for mobile/desktop transitions
  • Updated BottomTabBar component:
    • Replaced hardcoded background color with themeTokens.semantic.surfaceGlass
    • Replaced hardcoded media query breakpoint with themeTokens.breakpoints.mobile
  • Updated CSS variables: Added --semantic-surface-glass to index.css for consistency
  • Improved documentation: Added clarifying comment about !important usage on background-color to override MUI's CssBaseline

Implementation Details

  • The surfaceGlass token is specifically designed for semi-transparent overlay backgrounds with blur effects (glassmorphism pattern)
  • Breakpoints are now centralized, making it easier to maintain consistent responsive behavior across the application
  • All changes maintain backward compatibility while improving code maintainability

https://claude.ai/code/session_01XMnEqXu6R4M4sjuUdgmQsy

- Add `surfaceGlass` semantic token for frosted glass background color
- Add `breakpoints.mobile` constant (768px) for mobile/desktop media queries
- Use theme constants in bottom-tab-bar.tsx instead of hardcoded rgba and media query
- Add corresponding `--semantic-surface-glass` CSS variable
- Document why !important is needed on background-color in index.css
  (overrides MUI CssBaseline's Emotion-injected styles)

https://claude.ai/code/session_01XMnEqXu6R4M4sjuUdgmQsy
@vercel
Copy link

vercel bot commented Feb 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
boardsesh Building Building Feb 9, 2026 8:05am

Request Review

@claude
Copy link

claude bot commented Feb 9, 2026

Claude Review

Ready to merge - No significant issues found.

This is a clean refactor that extracts hardcoded values into theme tokens (surfaceGlass and breakpoints.mobile). The implementation is correct and follows existing patterns in theme-config.ts.

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.

2 participants