Skip to content

refactor(styles): centralize hardcoded colors into theme tokens#67

Merged
acald-creator merged 1 commit into
mainfrom
refactor/centralize-theme-tokens
Apr 13, 2026
Merged

refactor(styles): centralize hardcoded colors into theme tokens#67
acald-creator merged 1 commit into
mainfrom
refactor/centralize-theme-tokens

Conversation

@acald-creator
Copy link
Copy Markdown
Owner

Summary

  • Add border and placeholder tokens to Theme.res
  • Expand Emotion.Utils Color module with border, borderHover, placeholder, textInverse, errorDark, secondaryLight/Dark
  • Replace hardcoded hex values with token references across 8 files:
    • Button.res — secondary bg/text, ghost hover, danger hover now use tokens
    • Card.res — all variant backgrounds, borders, and shadows use tokens
    • Input.res — all variant backgrounds, borders, text, placeholder use tokens
    • Typography.res — base and caption/overline colors use tokens
    • App.res — inline section colors and borders use tokens
    • Styles.res — container border uses token
  • Fix stale #e5e7eb default in Emotion Border utility

Test plan

  • bun run res:build — 82 modules compiled, zero warnings
  • bun run build — production build succeeds
  • bun run test — all 18 tests pass

Changing any color in Theme.res now propagates across all components automatically.

Closes #50

Add border and placeholder tokens to Theme.res. Expand Emotion.Utils
Color module with border, hover, placeholder, and missing semantic
color variants. Replace hardcoded hex values across Button, Card,
Input, Typography, App, and Styles with token references.

Closes #50
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

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

Project Deployment Actions Updated (UTC)
rspack-rescript Ready Ready Preview, Comment Apr 13, 2026 6:51am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

Warning

Rate limit exceeded

@acald-creator has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 17 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 4 minutes and 17 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46da4fbf-108a-49b8-8792-00d549ed20e0

📥 Commits

Reviewing files that changed from the base of the PR and between 017ed6b and 09d8dd6.

📒 Files selected for processing (8)
  • src/App.res
  • src/bindings/Emotion.res
  • src/components/Button/Button.res
  • src/components/Card/Card.res
  • src/components/Input/Input.res
  • src/components/Typography/Typography.res
  • src/styles/Styles.res
  • src/styles/Theme.res
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/centralize-theme-tokens

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.

@acald-creator acald-creator merged commit 36ef618 into main Apr 13, 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.

[refactor] Establish consistent styling patterns across codebase

1 participant