fix(join): stop the arena callout washing out in dark mode - #208
Open
barunaniket wants to merge 1 commit into
Open
fix(join): stop the arena callout washing out in dark mode#208barunaniket wants to merge 1 commit into
barunaniket wants to merge 1 commit into
Conversation
The "register first" callout rendered as a light cream card with near-invisible text in dark mode, while every other panel on the page rendered correctly. Not a colour choice — a layering bug. MechaPanel builds its chamfered edge from stacked elements: .mecha__inline paints the outline colour and .mecha__body paints an opaque --mecha-fill on top of it, leaving only a 1px ring of outline visible. The callout passed `bg-bronze/5` through bodyClassName, and because utilities outrank the components layer, that replaced the opaque fill with a 5%-transparent one — so .mecha__inline's light outline colour showed through the whole body. In dark mode that layer is a pale tan, hence the cream card under light dark-mode text. Tinting through --mecha-fill instead keeps the body opaque and derives both the tint and the base from theme variables, so it follows light and dark without a second rule. globals.css already establishes this as the way to retint a panel (.mecha--ide overrides the same variable). Also drops `border-bronze/20` from the same class list: .mecha__body has no border to style — the visible edge is the .mecha/.mecha__inline layers — so it never did anything. Checked the rest of the codebase for the same mistake; this was the only bodyClassName passing a bg-* utility.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
barunaniket
requested review from
hagemaruwu,
shivanshpap and
vaibhavtulsian
as code owners
September 9, 2026 14:02
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.
The "register first" callout on
/joinrendered as a light cream card with near-invisible text in dark mode, while every other panel on the page was fine.Cause
Not a colour choice — a layering bug, and a trap anyone would fall into.
MechaPanelbuilds its chamfered edge from stacked elements:The callout passed
bg-bronze/5throughbodyClassName. Tailwind utilities outrank the@layer componentsrule, so that replaced.mecha__body's opaquebackground: var(--mecha-fill)with a 5%-transparent one — and.mecha__inline's outline colour showed through the entire body instead of just its 1px ring. In dark mode--mecha-lineis a pale tan, which is exactly the cream card in the screenshot. The text was correct for dark mode all along; it was the background that flipped.Fix
Tint through the panel's own variable instead of overriding the background:
The body stays opaque, and both the tint and the base come from theme variables — so it follows light and dark with no second rule.
globals.cssalready establishes this as the way to retint a panel:.mecha--ideoverrides the same variable.Also removes
border-bronze/20from the same class list..mecha__bodyhas no border to style — the visible edge is the.mecha/.mecha__inlinelayers — so it was a no-op.Scope
Grepped for the same mistake across
src/; this was the onlybodyClassNamepassing abg-*utility. There's a comment above the const explaining the trap so the next person doesn't reintroduce it.Verified
npx tsc --noEmitclean · lint 0 errors · 90/90 tests · build succeeds · confirmed on the local dev server thatbg-bronze/5is gone and the--mecha-filloverride is applied.Worth a visual check in dark mode before merging, since the fix is visual.