Skip to content

Glass tinted by the theme; material on Navbar.Row and Footer - #298

Merged
pathscale merged 2 commits into
masterfrom
fix/glass-follows-theme
Sep 29, 2026
Merged

pathscale merged 2 commits into
masterfrom
fix/glass-follows-theme

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Glass is now the page's own surface made translucent, not a white film.

  • Theme colours, not white: both themes and every component fallback (Card, _shared/material.css, GlowCard) tint glass with base-100 and border it with base-content. Highlights stay white.
  • One opacity curve: dark mode's curve assumed the white film (4% to 26%). A dark film at those values all but vanishes, so both modes use the same curve, and the dark theme's film is the value it derives, 41.55%.
  • material on Navbar.Row and Footer: opt-in, so with it unset neither changes. A glass row drops its flavour's fill and takes the surface's text colour.

Why: 24x.ai's glass cards came out milky white in dark mode. The site had written its own .glass-nav CSS and overrode --glass-* to escape it, so the nav and the panels were two different glasses. With this, 24x deletes its glass CSS: the nav row and the cards both use material="glass", and the site's only setting is applyGlassTokens({ blur: 4 }, "dark").

Checked locally:

  • bun run check, build and bun run test: 321/321.
  • Lint adds no errors in the changed files; the 134 errors already on master are untouched.
  • Built into 24x in a browser: nav row and cards compute the same film (the theme's dark background at 41.55%), blur (4px) and saturation (1.15). 24x's ps-qa passes, desktop 58/58 and phone 21/21.

Releases as 3.3.0 (fix plus feat).

meh added 2 commits September 30, 2026 01:12
The themes and every component fallback drew glass as a white film.
On a dark theme that read as milky rather than as glass, and sites
overrode the tokens or wrote their own glass CSS to escape it. The
film is now base-100 and the border base-content, in both themes and
in the fallbacks, so glass is the page's own surface made
translucent. Highlights stay white.

Dark mode's opacity curve assumed the white film (4% to 26%); a dark
film at those values all but vanishes, so both modes take the one
curve, and the dark theme's film is the value it derives, 41.55%.
A header row or a footer can now be glass like a card, from the same
tokens, instead of a site writing its own glass CSS for it. Opt-in:
with material unset neither element gets a data-material attribute and
renders as before. A glass row drops its flavour's fill, which would
hide the glass, and takes the surface's text colour.
@pathscale
pathscale merged commit 6f87732 into master Sep 29, 2026
1 check passed
@pathscale
pathscale deleted the fix/glass-follows-theme branch September 29, 2026 18:16
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.

1 participant