Storybook: Addon-docs: MDX classes have precedence over custom user classes

Created on 19 Dec 2019  路  2Comments  路  Source: storybookjs/storybook

Is your feature request related to a problem? Please describe.
CSS classes added by MDX have precedence over the custom classes added by the user.

You can see it in action in the following screenshot. Same code rendered twiced. The first box is in a story, the second is not.

image

Describe the solution you'd like
It would be nice if we could import a block like <ResetStyles> and paste inside code that shouldn't be affected by MDX default styles.

docs feature request inactive mdx todo

Most helpful comment

@shilman yes!

In my SB I overcame this by repeating all my selectors 4 times. That's more a hack than a solution though.

All 2 comments

@patricklafrance is this still a problem?

@shilman yes!

In my SB I overcame this by repeating all my selectors 4 times. That's more a hack than a solution though.

Was this page helpful?
0 / 5 - 0 ratings