[@mantine/core] MantineProvider: Restore dark mode light-color to match v8#9055
Open
h-harsh wants to merge 1 commit into
Open
[@mantine/core] MantineProvider: Restore dark mode light-color to match v8#9055h-harsh wants to merge 1 commit into
h-harsh wants to merge 1 commit into
Conversation
…ch v8 Closes mantinedev#8895 In dark mode the `--mantine-color-{color}-light-color` variable resolved to shade `0` (near-white), so the `light`, `subtle`, and `transparent` variants lost their color identity and rendered near-white text/icons — a regression from v8, where it resolved to `shade[primaryShade - 5]` (a visible tint of the color). This was an unintended side effect of 2cdebb6, whose goal was to make the `-light` backgrounds solid instead of translucent. That refactor also flattened the shared text color to shade 0. This restores the v8 value for the text color while keeping the solid (no-transparency) backgrounds. The `light` variant's background is `darken(shade9, 0.5)` (very dark), so a shade-3 colored text still contrasts well, and the subtle/transparent variants regain their color on the app background. - Resolve dark `-light-color` to `shade[max(primaryShade - 5, 0)]`. - Regenerate default-css-variables.css and update the resolver snapshot.
h-harsh
force-pushed
the
fix/dark-mode-light-color
branch
from
July 12, 2026 19:23
4ff22d9 to
5752eb7
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.
Closes #8895
In dark mode,
--mantine-color-{color}-light-colorresolved to shade0(near-white), so thelight,subtle, andtransparentvariants lost their color identity and rendered near-white text/icons. In v8 it resolved toshade[primaryShade - 5](a visible tint of the color) — this is the v8→v9 regression reported in the issue (e.g. an orangesubtleActionIcon rendered white in dark mode).Root cause
The shared text color was flattened to shade
0as an unintended side effect of 2cdebb6, whose actual goal was to make the-lightbackgrounds solid instead of translucent:--mantine-color-{color}-light-coloris the text/icon color shared by thelight,subtle, andtransparentvariants, so this affected all three.Fix
Restore the v8 value (
shade[max(primaryShade - 5, 0)], i.e. shade 3 for the default darkprimaryShadeof 8) while keeping the solid, no-transparency backgrounds from the original commit:darken(shade9, 0.5)(very dark), so shade-3 colored text still contrasts well while regaining color identity.Changes
-light-colortoshade[max(primaryShade - 5, 0)]inget-css-color-variables.ts.default-css-variables.cssand update the resolver snapshot — the only diff is the 14 default dark-light-colorvalues changing0 → 3.Note for maintainers
This changes the appearance of
light/subtle/transparentvariants in dark mode for everyone, so it's worth a design check. I went with exact v8 parity since that's what the issue asks; happy to target a different shade (e.g. aligning withoutline'sshade[primaryShade - 4]) if you'd prefer.Verification
tsc --noEmitclean,oxlintclean,stylelintclean, formatted@mantine/corebuilds (incl..d.tsgeneration)