Skip to content
/ incurve Public
forked from welaika/incurve

InCurve, easy CSS inline for your Rails mailers.

License

Notifications You must be signed in to change notification settings

afar/incurve

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InCurve provides a single, beautiful, handy helper method for your Rails app, letting you easily inline any CSS code present on your mail views. InCurve is just a small wrapper around the “premailer” gem.

If you have this mail view:

<% incurve_css do %>
  <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css">
        body { 
          background-color: #e6e6e6;
          background-position: top center;
          background-repeat: no-repeat repeat-y;
          margin: 0;
          padding: 0;
        }
      </style>
    </head>
    <body>
    </body>
  </html>
<% end %>

The mail you’ll send will be like this:

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />    
  </head>
  <body style="background-color: #e6e6e6; background-position: top center; background-repeat: no-repeat repeat-y; margin: 0; padding: 0;">
  </body>
</html>

Sweet.

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 weLaika. See LICENSE for details.

About

InCurve, easy CSS inline for your Rails mailers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published