Closed dhowe closed 4 years ago
@cqx931 note that if it is impossible to include any of that css as inline-react code, then we may have to use this file, which is injected into the head of the generated html file (in spectre-mail project which, for now, is a separate repo)
A few useful resources for material-ui server-side rendering: https://material-ui.com/styles/api/#serverstylesheets https://material-ui.com/guides/server-rendering/
Please check: https://github.com/dhowe/spectre-mail/pull/1 Fixed svg and got the material-ui jss to be correctly rendered for server-side.
It still doesn't look like exactly the same as the spectre client-side at the moment but we can tweak those details later.
this is excellent work... next steps would be to get the avatar and text from the comment into the template, then I can hook it up to the mailer stuff
@cqx931 let me know your schedule
yes, there are some strategies for minimizing the bundle size for material UI. I can take a look into that to make sure the email size won't get too big from the design.
Can you point me to the import-css line that is in the current jsx templates?
Something like purgecss would also be helpful to remove unused css. https://github.com/FullHuman/purgecss-webpack-plugin
closing this as discussed in other tickets
So we need to use inline (react-style) css for components that we will send in email (OceanProfile and AvatarComponent so far).
The css code here was originally scss (from OceanProfile.scss), which I converted to css and it appears to work ok.
But we need it to be react-inline-style. With an online converter I get the inline styles below, but they don't work the same (at least the rotate transform fails).