Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Storybook: Components: Apply style changes #18676
This update fixes the Storybook x WP/Components workflow to enable for style changes made in
Storybook's webpack config was also enhanced with
How has this been tested?
Types of changes
Some things to consider would be how this may impact the build Storybook to be uploaded and served to Github pages. I don't think it would have too much of a negative impact.
This update fixes the Storybook x WP/Components workflow to enable for style changes made in `.scss` files to be reflected within Storybook. Previously, this was not supported because only the pre-built `.css` file was imported. There is an interesting gotcha in this setup. The style built step leverages PostCSS for certain enhancements. For example, the `color()`. By only loading the `.scss` file, this does not work, resulting in certain styles not rendering correctly. As a work-around, I've kept one of the built `.css` files, but also loading the `.scss` file to enable the improved UI dev experience.