Pico 2 ships light and dark palettes driven by CSS variables. By default, light is the baseline; dark can follow prefers-color-scheme: dark or explicit data-theme="dark" on html (or a subtree).
Scoping themes
Set data-theme on html for the whole document, or on a section / article when one card should stay light inside a dark page. Elements like button, input, table, and dialog read scheme variables automatically; bare section wrappers may need background-color: var(--pico-background-color) if you want an explicit surface.
Theme colors
When compiling from Sass, $theme-color picks a primary accent from Pico’s palette (azure, purple, jade, etc.). CDN users can still tune --pico-primary and related variables in a small custom stylesheet.
Self-check
- Which attribute forces dark mode regardless of OS preference?
- Why might a nested
articleuse its owndata-theme?