From 20ac6fcf5efc833bf3d9c0ed92db09d979aa88b3 Mon Sep 17 00:00:00 2001 From: simurai Date: Wed, 7 Oct 2020 16:01:52 +0900 Subject: [PATCH] Add color-scheme properties --- src/base/modes.scss | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/base/modes.scss b/src/base/modes.scss index eceb16dc..35a5daa0 100644 --- a/src/base/modes.scss +++ b/src/base/modes.scss @@ -6,8 +6,8 @@ // Outputs the CSS variables // Use :root (html element) to define a default -@include primer-colors-light(":root, [data-color-mode='light']"); -@include primer-colors-dark("[data-color-mode='dark']"); +@include primer-colors-light(':root, [data-color-mode="light"]'); +@include primer-colors-dark('[data-color-mode="dark"]'); // Color mode boundaries // Enables nesting of different color modes @@ -16,3 +16,9 @@ color: var(--color-text-primary); background-color: var(--color-bg-canvas); } + +// color-scheme +// Enables color modes for native elements + +[data-color-mode="light"] { color-scheme: light; } +[data-color-mode="dark"] { color-scheme: dark; }