·
473 commits
to master
since this release
Minor Changes
-
#334
0d8efe2Thanks @markdalgleish! - Support multiple default conditionsIf your conditions are mutually exclusive (e.g. light mode and dark mode), you can now provide an array of default conditions. For example, the following configuration would automatically expand
atoms({ background: 'white' })to the equivalent ofatoms({ background: { lightMode: 'white', darkMode: 'white' }}).import { createAtomicStyles } from '@vanilla-extract/sprinkles'; const responsiveStyles = createAtomicStyles({ conditions: { lightMode: { '@media': '(prefers-color-scheme: light)' }, darkMode: { '@media': '(prefers-color-scheme: dark)' }, }, defaultCondition: ['lightMode', 'darkMode'], // etc. });