-
Notifications
You must be signed in to change notification settings - Fork 364
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
css content dumped into style tag after premailer compile #334
Comments
soundasleep
added a commit
to soundasleep/premailer-rails
that referenced
this issue
Oct 17, 2018
Premailer very happily generates email with thousands of unnecessary lines in the inline <style> tag, which means that at some point, some email clients (particularly Gmail) will refuse to render the email, and will instead clip the email with "[Message clipped] View entire message". It seems this clip is around ~100 KB of inline <style> tags. This new config option, :drop_inline_style_tags, will take the generated `to_inline_css`, and drop the <style> tag completely. In theory, this shouldn't have any impact, beacuse all of the relevant CSS will have been applied to the elements themselves anyway. Resolves issues such as: - premailer/premailer#334 - fphilipe#192 - fphilipe#184
soundasleep
added a commit
to soundasleep/premailer-rails
that referenced
this issue
Oct 17, 2018
Premailer very happily generates email with thousands of unnecessary lines in the inline <style> tag, which means that at some point, some email clients (particularly Gmail) will refuse to render the email, and will instead clip the email with "[Message clipped] View entire message". It seems this clip is around ~100 KB of inline <style> tags. This new config option, :drop_inline_style_tags, will take the generated `to_inline_css`, and drop the <style> tag completely. In theory, this shouldn't have any impact, because all of the relevant CSS will have been applied to the elements themselves anyway. Resolves issues such as: - premailer/premailer#334 - fphilipe#192 - fphilipe#184
I've tried to resolve this in the |
Here you go: #374 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any reason why the following html:
should result in this after premailer performs to_inline_css?
Premailer inlines all the relevant css correctly, but also creates a huge style tag with irrelevant css from the original stylesheet. This is causing a problem for me as the resulting html becomes too big and email clients clip the message.
In what cases does Premailer create a style tag?
I am using all default configuration settings, so options like "include_style_tags" is false.
The text was updated successfully, but these errors were encountered: