style-dictionary-dark-mode
style-dictionary-dark-mode copied to clipboard
Web Integration formatter for single-token setup needs to use allTokens
Hi there!
I was following the blog post (which is amazing btw, thank you!) to create a dark mode setup with the single token version for web, and I believe the following line
dictionary.allProperties = dictionary.allProperties.map(token => {
needs to be become
dictionary.allTokens = dictionary.allTokens.map(token => {
given that properties has been deprecated in favor of tokens. When running that formatter with allProperties
, the darkValue was not coming through to the variables-dark.css file, but it does work as soon as I switch to allTokens
Thank you @ayeshakmaz!