Skip to content

Use percentages for the navbar dark color-mix() weights - #42925

Merged
mdo merged 1 commit into
v6-devfrom
fix-navbar-dark-color-mix-percentages
Sep 12, 2026
Merged

mdo merged 1 commit into
v6-devfrom
fix-navbar-dark-color-mix-percentages

Conversation

@julien-deramond

Copy link
Copy Markdown
Member
  • color-mix() needs a <percentage> as the mixing weight. Four $navbar-dark-tokens values pass a bare number instead, so .navbar-dark link colors are invalid at computed-value time and the element inherits its color.
  • Nothing warns about it: a bare number is a valid custom property declaration, it only fails when var() substitutes it. That is why it survived review.
  • The values came from the v5 rgba($white, .55) form in v6: Use token Sass map to customize CSS variables instead of Sass variables #41983 and kept the decimal. The other 28 color-mix() calls in the stylesheet already use percentages.
  • .55 → 55%, .75 → 75%, .25 → 25%, .1 → 10%.

Checked in Chrome 148: with .55 the probe inherits its parent's rgb(255, 0, 0), with 55% it computes oklch(0.999994 0.0000497986 none / 0.55).

No dist in the diff.

Found while working on julien-deramond/bootstrap-tokens#14.

🤖 Generated with Claude Code

CSS Color 5 requires a <percentage> for the color-mix() mixing weight. A
bare number parses in a custom property declaration, but makes the value
invalid at computed-value time. Every .navbar-dark link color was dropped,
and the element inherited its color instead. No browser reports a warning.

The four values came from the v5 rgba($white, .55) form and kept the
decimal. The other 28 color-mix() calls in the stylesheet use percentages.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@julien-deramond
julien-deramond requested a review from a team as a code owner September 12, 2026 06:27
@julien-deramond julien-deramond added css Sass sources or compiled CSS v6 v6, the main branch labels Sep 12, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in v6.0.0 Sep 12, 2026
@julien-deramond
julien-deramond requested review from mdo and removed request for a team September 12, 2026 06:28
@mdo
mdo merged commit 9e8c00d into v6-dev Sep 12, 2026
12 checks passed
@mdo
mdo deleted the fix-navbar-dark-color-mix-percentages branch September 12, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css Sass sources or compiled CSS v6 v6, the main branch

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants