Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Find a solution to storybooks importing conflicting styles #9701

Closed
felixfbecker opened this issue Apr 9, 2020 · 0 comments · Fixed by #10033
Closed

Find a solution to storybooks importing conflicting styles #9701

felixfbecker opened this issue Apr 9, 2020 · 0 comments · Fixed by #10033
Assignees

Comments

@felixfbecker
Copy link
Contributor

Storybooks are for browser, webapp and shared. Webapp components depend on global styles and Bootstrap, but those should not be imported for shared components.

Related issue: storybookjs/storybook#729

Solution proposal:
Use webpack loader to import the styles a component depends on as a string, then render them in a <style> tag in the story-specific decorator.

Noticed by @attfarhan in #9628

This is crucial to solve if we want Percy screenshot tests for Storybooks (#9565).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant