Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/utils/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,9 @@ export const createAppTheme = () => {

// --- Display-P3 override layer -------------------------------------------------------------

const isColorValue = (v: string) => v.startsWith('#') || v.startsWith('rgb');
// MUI composes some tokens from other vars (Skeleton's bg is `rgba(var(...) / 0.13)`), which P3 can't parse.
const isColorValue = (v: string) =>
(v.startsWith('#') || v.startsWith('rgb')) && !v.includes('var(');

// Walk a color scheme's palette and, for every solid color leaf, emit a P3 override keyed to
// the CSS variable MUI generates for it (`--mui-palette-<path joined by '-'>`). Non-color
Expand Down
Loading