diff --git a/tokens/style-dictionary.js b/tokens/style-dictionary.js index 5ee753b476..cfe1354a7b 100644 --- a/tokens/style-dictionary.js +++ b/tokens/style-dictionary.js @@ -166,8 +166,8 @@ StyleDictionary.registerFormat({ let customMediaVariables = ''; - Object.keys(breakpoint).forEach(key => { - customMediaVariables += `@custom-media --${breakpoint[key].name} (max-width: ${breakpoint[key].value}); \n`; + Object.values(breakpoint).forEach(item => { + customMediaVariables += `@custom-media --${item.name} (max-width: ${item.value}); \n`; }); return fileHeader({ file }) + customMediaVariables;