1
1
mirror of https://github.com/primer/css.git synced 2024-12-12 10:47:14 +03:00

Add color-scheme properties

This commit is contained in:
simurai 2020-10-07 16:01:52 +09:00
parent 805cfbd7c8
commit 20ac6fcf5e

View File

@ -6,8 +6,8 @@
// Outputs the CSS variables // Outputs the CSS variables
// Use :root (html element) to define a default // Use :root (html element) to define a default
@include primer-colors-light(":root, [data-color-mode='light']"); @include primer-colors-light(':root, [data-color-mode="light"]');
@include primer-colors-dark("[data-color-mode='dark']"); @include primer-colors-dark('[data-color-mode="dark"]');
// Color mode boundaries // Color mode boundaries
// Enables nesting of different color modes // Enables nesting of different color modes
@ -16,3 +16,9 @@
color: var(--color-text-primary); color: var(--color-text-primary);
background-color: var(--color-bg-canvas); 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; }