🐛 fix: improve dark mode and OS theme handling (#380)
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
@mixin theme-variables($theme) {
|
||||
@if $theme =='light' {
|
||||
--primary-color: #D33C5C; // Contrast ratio: 4.61:1
|
||||
}
|
||||
@else if $theme == 'dark' {
|
||||
--primary-color: #fabed2; // Contrast ratio: 10.48:1
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
--primary-color: #D33C5C; // Contrast ratio: 4.61:1
|
||||
@include theme-variables('light');
|
||||
}
|
||||
|
||||
[data-theme='dark'] {
|
||||
--primary-color: #fabed2; // Contrast ratio: 10.48:1
|
||||
@include theme-variables('dark');
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme='light']) {
|
||||
@include theme-variables('dark');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user