-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storybook's styling overrides all #17533
Comments
I know this issue is more than a year old, but I just had the problem and I solved it for the moment by setting <div className="sb-unstyled">
....
</div> EDIT: even better, TIL the existence of @storybook/blocks import { Unstyled } from '@storybook/blocks';
<Unstyled>
...
</Unstyled> |
I don't know how this is still an issue. I've read the same problem with the same workaround like 5 times today. IMHO storybook should use a css layer for the default styles so any non-layered styles automatically get a higher cascading priority. Or the theming approach should be extended a lot so it actually provides a complete way to customize storybooks ui.. |
Yeah, this is really weird. This is tagged I had to get weird with it. https://gist.github.com/miclgael/73ce0297321338d4092258d99240710f |
As workaround for my case just override these classes as can to do in preview-head:
|
Workaround that works for me. I added to
|
No one that workarounds work for me, I use nuxt3 and PrimeVue |
Describe the bug
Storybook's css seems to take priority over everything, which doesn't make much sense for a default.
The image below shows that the font-size/family for the
p
is being overridden by an injectedcss-xxx
class.** I do have the font that I want set in the theme, but that doesn't seem to have any effect.
There is also the issue of the sbdoc and sbdocs-* classes that are injected to all my components.
![image](https://user-images.githubusercontent.com/41582/154575126-53d81e51-2ade-4010-b72d-1c9cc08be8de.png)
The text was updated successfully, but these errors were encountered: