Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Theme UI styles are not applied during MDX transformations #124

Closed
maiertech opened this issue Dec 7, 2020 · 2 comments · Fixed by #134
Closed

Theme UI styles are not applied during MDX transformations #124

maiertech opened this issue Dec 7, 2020 · 2 comments · Fixed by #134

Comments

@maiertech
Copy link
Owner

maiertech commented Dec 7, 2020

This problem manifests itself through links in MDX pages that are styled with browser defaults instead of the styles from Theme UI's styles object.

Screen Shot 2020-12-06 at 11 19 11 PM

@maiertech maiertech self-assigned this Dec 7, 2020
@maiertech maiertech changed the title Links are rendered with user agent styling Theme UI styles are not applied during MDX transformations Dec 7, 2020
@maiertech
Copy link
Owner Author

maiertech commented Dec 7, 2020

The rendered pages contain a ThemeProvider component. This is coming from gatsby-plugin-theme-ui, which wraps every page with a ThemeProvider. The ThemeProvider creates an MDXProvider, which receives theme and components props. components should contain all components derived from theme.styles.

Nested below is a second MDXProvider component with an empty components prop. This should normally not be a problem because the inner MDXProvider would simply merge its components with the outer one.

@maiertech
Copy link
Owner Author

Related issue: system-ui/theme-ui#1345.

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

Successfully merging a pull request may close this issue.

1 participant