Skip to content

Commit

Permalink
Merge pull request #547 from chromaui/styles-debug
Browse files Browse the repository at this point in the history
faq styles
  • Loading branch information
winkerVSbecks authored Aug 22, 2024
2 parents 61dfcd5 + f228dc7 commit cf6564b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/content/storybook/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,19 @@ Use the same method to debug the following errors:
`✖ Failed to publish build - Failed to extract stories from your Storybook`

</details>

<details>
<summary>Why are styles not applied correctly in stories?</summary>

If styles are not rendering correctly, there could be several reasons behind that:

1. **The order in which stylesheets are loaded.**

- In development mode, styles from the preview might be imported earlier than component styles, while in production mode, this order could be reversed. This affects the specificity and, ultimately, the rendering of styles. If this is the case, the styles render but are overwritten by others.
- In Storybook 6 and earlier, stylesheets were loaded upfront, while from Storybook 7 onwards, stylesheets are loaded on-demand when the story is viewed. This affects how styles load.

2. **Browser compatibility.** If the browser version does not support certain CSS features, styles may not apply correctly. Find browser versions supported by our Capture Infrastructure [here](/docs/infrastructure-release-notes).

If you have additional questions, use our **in-app chat** to contact or email us at [[email protected]](mailto:[email protected]).

</details>

0 comments on commit cf6564b

Please sign in to comment.