mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Completely fixed theme colors
This commit is contained in:
@@ -69,6 +69,18 @@ class Doc extends Document {
|
||||
const root = document.documentElement;
|
||||
|
||||
root.style.setProperty('--theme', theme);
|
||||
root.style.setProperty(
|
||||
'--background',
|
||||
theme === 'light' ? '#F9F9F9' : '#262626'
|
||||
);
|
||||
root.style.setProperty(
|
||||
'--secondary-background',
|
||||
theme === 'light' ? 'white' : '#2F2F2F'
|
||||
);
|
||||
root.style.setProperty(
|
||||
'--text',
|
||||
theme === 'light' ? 'black' : 'white'
|
||||
);
|
||||
})();
|
||||
`
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user