mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: detect auto mode
This commit is contained in:
parent
4c9ebc414b
commit
d1197a5068
1 changed files with 12 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
@use './variables.scss' as variables;
|
||||
|
||||
:root[data-color-mode='dark'] {
|
||||
@mixin assign {
|
||||
--gitako-auto-black: #{variables.$auto-black};
|
||||
--gitako-auto-white: #{variables.$auto-white};
|
||||
--gitako-auto-gray-0: #{variables.$auto-gray-0};
|
||||
|
|
@ -566,3 +566,14 @@
|
|||
--gitako-ansi-cyan: #{variables.$ansi-cyan};
|
||||
--gitako-ansi-cyan-bright: #{variables.$ansi-cyan-bright};
|
||||
}
|
||||
|
||||
// How to merge the selectors?
|
||||
// Is it possible to not have two copy of dark theme variables?
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root[data-color-mode='auto'] {
|
||||
@include assign();
|
||||
}
|
||||
}
|
||||
:root[data-color-mode='dark'] {
|
||||
@include assign();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue