Update custom tag CSS so all themes use the dark color scheme (#6245)

* Update useTagCSS.ts light = dark

* Update useTagCSS.ts so all themes use the same color scheme

* [autofix.ci] apply automated fixes

* Improve tag readability in light theme.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Juulz
2025-12-12 19:18:06 -05:00
committed by GitHub
parent a66ec78a50
commit 2e42903ba7
2 changed files with 11 additions and 19 deletions

View File

@@ -63,23 +63,9 @@ function getTagCSSColors(theme: Theme, color?: string | null) {
];
}
if (theme === 'auto') {
theme = window.matchMedia('(prefers-color-scheme: light)').matches
? 'light'
: 'dark';
}
if (theme === 'light') {
return [
`${color} !important`,
`color-mix(in srgb, ${color} 15%, white)`,
`color-mix(in srgb, ${color} 25%, white)`,
];
} else {
return [
getContrastedColor(color),
color,
`color-mix(in srgb, ${color} 85%, white)`,
];
}
return [
getContrastedColor(color),
color,
`color-mix(in srgb, ${color} 85%, white)`,
];
}