-
Notifications
You must be signed in to change notification settings - Fork 3
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
@styled-system/css inside MDX #10
Comments
I might be wrong, but I think it depends on how you've set up the css prop. I think the babel preset works, but the custom pragma (currently) can't be used together with MDX's custom pragma, see https://emotion.sh/docs/css-prop |
I will experiment some more and try to put together a MWE. Currently it's not working in my one project with the babel preset, but who knows what else might be effecting that. I'll try to get back to you. Thank you for your response. |
Well, so far, no luck. If I import a component using the css prop, it renders just fine. If I actually write in the mdx file something with the css prop, I get the error below in the browser console. I tested this in a stripped down Gatsby site that has the emotion plugin (which if I understand correctly, adds the correct babel preset for the css prop).
Error in the console:
|
Hello again,
Should the css prop work inside of MDX?
I have attempted to use it in both a normal MDX file and one that I was using MDX-blocks with.
Thanks.
The text was updated successfully, but these errors were encountered: