-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #547 from chromaui/styles-debug
faq styles
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> |