Open newtriks opened 8 months ago
Recipe Page: tailwindcss Recipe Template: tailwindcss Browser:
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.
sb-unstyled
🙏
😞
😌
Hey @newtriks 👋
This is a great call out <3 I'm going to add this to my to do this for early next week. Stay tuned 📻
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
😞
😌