mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Fix system light theme timing widget visibility (#7653)
Closes https://github.com/compiler-explorer/compiler-explorer/issues/7647 Fixed timing widget for light system: <img width="534" alt="Captura de pantalla 2025-05-04 a las 23 32 11" src="https://github.com/user-attachments/assets/23ea9e4c-160c-40ab-a1f7-aa3976ba4a0b" /> Also made the pink theme use the default chart.js colours, as I think they have more contrast than white-on-pink
This commit is contained in:
committed by
GitHub
parent
4649b3dd0e
commit
e76c78ccc0
@@ -153,7 +153,11 @@ function displayData(data: Data) {
|
||||
|
||||
const settings = Settings.getStoredSettings();
|
||||
let fontColour = defaults.color.toString();
|
||||
if (settings.theme !== 'default') {
|
||||
if (settings.theme === 'system') {
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
fontColour = '#ffffff';
|
||||
}
|
||||
} else if (settings.theme !== 'default' && settings.theme !== 'pink') {
|
||||
fontColour = '#ffffff';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user