etchteam / storybook-addon-css-variables-theme

Change the CSS variable based design tokens in your storybook on the fly
MIT License
28 stars 12 forks source link

Core functional doesn't work with postcss #3

Closed fenreys closed 2 years ago

fenreys commented 2 years ago

Greetings, @gavmck! i'm asking your attention and help

1) I added plug-in in my project using your tutorial

Unfortunatly, storybook started with errors, i found soluttion to my problem, after that: style, css 'n' postcss-loaders versions were downgreaded, and now storybook starts with additional options on tools-bar contained my themes, but..

anyway css variables are just don't working

gavmck commented 2 years ago

Why are the CSS variables inside classes? That will scope them to the class, which is not added by this plugin.

Try putting them inside a :root instead.

fenreys commented 2 years ago

Why are the CSS variables inside classes? That will scope them to the class, which is not added by this plugin.

Try putting them inside a :root instead.

Thanks a lot! Everything works, have a nice day c:

gavmck commented 2 years ago

Awesome, glad it worked! Hope you have fun with the plugin 😎