frontpage icon indicating copy to clipboard operation
frontpage copied to clipboard

[tailwindcss]: SB CSS specificity overrides TW (or other frameworks) CSS

Open newtriks opened this issue 10 months ago • 1 comments

Details

Recipe Page: tailwindcss Recipe Template: tailwindcss Browser:

What is wrong

I was wondering why my mdx documentation styled with TW was only partially working. I realised it was specificity related then found:

https://github.com/storybookjs/storybook/issues/10817

Request to update docs with:

Please add a small note or gotcha section with a sentence stating that due to CSS specificity, certain styles maybe overridden in MDX files by the SB CSS and to work around this you should wrap content in a div with the sb-unstyled class.

🙏

Screenshots

😞 Screenshot 2023-10-26 at 16 01 19

😌 Screenshot 2023-10-26 at 16 01 34

newtriks avatar Oct 26 '23 15:10 newtriks