fix(web): replace invalid alpha-append tints with color-mix - #203
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Aug 18, 2026
Twelve places built a translucent chip by string-appending a two-digit hex
alpha to a color:
background: `${RISK_COLOR[fraud.riskLevel]}14`
That only works when the value is a hex literal. Every color here is a
`var(--color-*)` token, so the result was the literal string
"var(--color-accent)14" , an invalid declaration the browser drops. The
chips lost their background entirely and their brand-colored text fell onto
whatever surface was underneath.
The fraud-score pill on the visit review page shows the shape of it: at
`high` risk the label resolves to --color-accent, so an orange label landed
on an orange background with no chip behind it.
Add tint() in lib/color.ts, which composes with color-mix and therefore
works against a custom property, and use it at all twelve sites. color-mix
is already used elsewhere in the app, so this adds no new browser
assumption.
SishirP17
force-pushed
the
fix/color-mix-tints
branch
from
August 18, 2026 22:52
ca08e60 to
051b143
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Twelve places built a translucent chip by string-appending a two-digit hex alpha to a color:
background: `${RISK_COLOR[fraud.riskLevel]}14`That works on a hex literal. Every color here is a
var(--color-*)token, so the result was the literal string"var(--color-accent)14"— an invalid declaration the browser silently drops. The chips lost their background entirely and their colored text fell onto whatever surface was underneath.The fraud-score pill on the visit review page shows the shape of it: at
highrisk the label resolves to--color-accent, so an orange label landed on an orange background with no chip behind it. On a<button>the missing background also exposed the gradient from #202.Affected:
VisitReviewPage(background + border),DashboardPage,CaregiverActivityPage(×2),StaffPage,MileageReviewPage,TimeOffReviewPage,SuperAdminPage(×3),InsightsPanel.What changed
tint()inlib/color.tscomposes withcolor-mix, which works against a custom property.color-mixis already used elsewhere in the app, so this adds no new browser assumption.Alphas are carried over at equivalent percentages (
14→ 8%,18→ 9%,33→ 20%,40→ 25%,55→ 33%).Second of five, stacked on #202.