Supporting Emails/Inline Styles #53
inlineblock
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
style9 has no understanding of elements, it only generates a string of class names. After the compile step there is also no style values left in the code. Therefore it's not possible to generate inline styles using style9. From your example 8000 it looks like you are using style9-components.macro, which creates React components, but otherwise behaves as described. What you could do, if you wanted to generate inline styles, is write your own macro which does that, and to it when compiling for emails. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would really like to be able to share my components to be used for emails as they are for web.
Then in run time I could tell style9 to render everything inline, using the style prop, that way it could be SSR'd to a string for use in emails.
Some API like this, maybe using a context or a style9 setting to know whether it should be using the className or style prop.
Beta Was this translation helpful? Give feedback.
All reactions