Skip to content

Instantly share code, notes, and snippets.

@hachesilva
Created March 24, 2023 14:54
Show Gist options
  • Save hachesilva/9261d26035cce976d5ae284f3fb9ea81 to your computer and use it in GitHub Desktop.
Save hachesilva/9261d26035cce976d5ae284f3fb9ea81 to your computer and use it in GitHub Desktop.
Dark-light color schemes using System default colors
/*
Source: https://blog.jim-nielsen.com/2021/css-system-colors/
*/
/* Set global color scheme without setting a background */
:root {
color-scheme: light dark;
}
/* Use system colors for dropdowns */
.dropdown {
background-color: Canvas;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment