storybook-design-token
storybook-design-token copied to clipboard
Tokens parsing can't find the end if the new token starts after a closing curly brace
I have code similar to
:root {
/**
* @tokens Base-Colors
* @presenter Color
*/
--grey1100: rgb(26, 28, 32);
--grey1000: (42, 46, 52);
}
body.theme-dark {
/**
* @tokens Dark-Colors
* @presenter Color
*/
--cu-background-app-background: rgb(var(--_cu-grey1000));
--cu-background-app-background-inverse: rgb(var(--_cu-white));
}
When this is parsed, the parser can't find the end of Base-Colors so the Dark-Colors are included in the Base-Colors render block.
I've gotten around this by placing
/**
* @tokens End-Base-Colors
* @presenter Color
*/
Right before the closing curly brace.
Thanks for reporting. I'll look into it.
Hey. Should be fixed with v2.7.0.