mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-21 15:36:50 -05:00
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:
@@ -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)`,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user