How to Inline CSS Styles in Email Mailers Using premailer-rails

Posted on

Did you know you can inline CSS in Ruby on Rail’s mailers using the premailer-rails gem? You just need to drop it in & it’ll just work!

You can also use postcss-css-variables to calculate the value of CSS Variables, so they’ll fallback perfectly in older email clients such as Outlook.