storybook-design-token icon indicating copy to clipboard operation
storybook-design-token copied to clipboard

Feature request: override design token value

Open edoardocavazza opened this issue 2 years ago • 1 comments

Consider the case:

_base.css

/**
 * @tokens Colors
 * @presenter Color
 */
:root {
    --color-primary: black;
}

index.css

@import './_base.css';

/**
 * @tokens Colors
 * @presenter Color
 */
:root {
    --color-primary: orange;
}

At the moment, the addon collects two entries, showing the variable twice in the Storybook.

We use to extend a primer css library in order to make our styles consistent across projects. I know it may not be a common case, but it makes sense to me that variable values are merged by the addon. Would you consider this change?

Thanks!

edoardocavazza avatar Apr 17 '22 18:04 edoardocavazza

I think this is a regression and should be working like you described it. I will look into it.

Sqrrl avatar May 13 '22 07:05 Sqrrl