style-dictionary-dark-mode icon indicating copy to clipboard operation
style-dictionary-dark-mode copied to clipboard

Web Integration formatter for single-token setup needs to use allTokens

Open ayeshakmaz opened this issue 3 years ago • 1 comments

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

ayeshakmaz avatar Jan 07 '22 19:01 ayeshakmaz

Thank you @ayeshakmaz!

nathanyoung avatar Apr 13 '24 16:04 nathanyoung