Automattic / juice

Juice inlines CSS stylesheets into your HTML source.
MIT License
3.1k stars 220 forks source link

Convert rem units to px values #258

Open mitar opened 7 years ago

mitar commented 7 years ago

I am using juice to inline CSS in e-mails. But if my CSS uses rem units (because I use the same CSS also on the website itself) then when such e-mail is displayed for example in Gmail, rem units correspond to Gmail root font size and not the root font size inside my HTML e-mail. So juice could see what the root font size is and recompute rem units to px values.

parshap commented 7 years ago

https://www.npmjs.com/package/rem-to-px may be helpful

cossssmin commented 6 years ago

+1 to the above - use a package. Changing your CSS for better email client support shouldn't be Juice's responsibility.