diff --git a/Justfile b/Justfile index 38f36be..142b5fb 100644 --- a/Justfile +++ b/Justfile @@ -5,7 +5,7 @@ format: treefmt just --fmt --unstable - prettier src/*.mjs --write + prettier src/*.mjs src/*.postcss --write format-dist: prettier dist/*.css --write diff --git a/src/theme.postcss b/src/theme.postcss index ed1d00e..c08e322 100644 --- a/src/theme.postcss +++ b/src/theme.postcss @@ -7,6 +7,14 @@ @mixin theme 9, 1; } +[data-prefers-contrast="more"] { + @mixin theme 9, 0; +} + +[data-prefers-contrast="less"] { + @mixin theme 9, 2; +} + @media (prefers-color-scheme: light) { :root { @mixin theme 9, 1; @@ -17,6 +25,14 @@ :root { @mixin theme 0, 8; } + + [data-prefers-contrast="more"] { + @mixin theme 0, 9; + } + + [data-prefers-contrast="less"] { + @mixin theme 0, 7; + } } [data-prefers-color-scheme="light"] {