Skip to content
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

Theme style does not apply to .mdx (7.0.0-rc11) #21866

Open
allenhwkim opened this issue Mar 31, 2023 · 1 comment
Open

Theme style does not apply to .mdx (7.0.0-rc11) #21866

allenhwkim opened this issue Mar 31, 2023 · 1 comment

Comments

@allenhwkim
Copy link

allenhwkim commented Mar 31, 2023

Describe the bug

I want to specify font family and size with .mdx files., but I was not able to do so because .mdx hard-hard styles.
However, styling works with stories within .mdx.

image

I added to global styling, ./storybook/preview-body.html but not working

<style>
html, body {
  font-size: 16px;
  font-family: Verdana;
}
</style>

I also have tried it with themeing, but not working either.

To Reproduce

https://stackblitz.com/edit/github-fj1jen-htlwjo?file=src%2Fstories%2Freproduction.mdx

image

System

$ npx sb@next info
Need to install the following packages:
  sb@7.0.0
Ok to proceed? (y) y

Environment Info:

  System:
    OS: macOS 12.0.1
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
  Browsers:
    Chrome: 111.0.5563.146
    Safari: 15.1
  npmPackages:
    @storybook/addon-a11y: ^7.0.0-rc.11 => 7.0.0-rc.11 
    @storybook/addon-essentials: ^7.0.0-rc.11 => 7.0.0-rc.11 
    @storybook/addon-interactions: ^7.0.0-rc.11 => 7.0.0-rc.11 
    @storybook/addon-links: ^7.0.0-rc.11 => 7.0.0-rc.11 
    @storybook/angular: ^7.0.0-rc.11 => 7.0.0-rc.11 
    @storybook/blocks: ^7.0.0-rc.11 => 7.0.0-rc.11 
    @storybook/manager-api: ^7.0.0-rc.11 => 7.0.0-rc.11 
    @storybook/testing-library: ^0.0.14-next.1 => 0.0.14-next.1 
    @storybook/theming: ^7.0.0-rc.11 => 7.0.0-rc.11 


### Additional context

_No response_
@allenhwkim allenhwkim changed the title [Bug]: style does not apply to .mdx (7.0.0-rc11) [Bug]: Theme style does not apply to .mdx (7.0.0-rc11) Mar 31, 2023
@allenhwkim allenhwkim changed the title [Bug]: Theme style does not apply to .mdx (7.0.0-rc11) Theme style does not apply to .mdx (7.0.0-rc11) Apr 1, 2023
@chaitanyadeorukhkar
Copy link

Have you managed to find any solution for this? Facing a similar problem with changing the font family on .mdx with v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants