Learn Rails 6 by Adam Notodikromo

Learn Rails 6 by Adam Notodikromo

Author:Adam Notodikromo
Language: eng
Format: epub
ISBN: 9781484260265
Publisher: Apress


<div class="card-inset">

Listing 5-63Styling by Using CSS Classes

<div style="background: #000;">

Listing 5-64Inline Styling by Using the Tag’s Style Property

Not only is doing this error-prone in the long run, it is also abstruse for uninitiated readers. The question is then: can we have the best of both worlds? That is, to keep having classes defined discretely, yet inline them when sending an email, we can use premailer-rails to do that hard work for us.

So, now, we can change the content of mailer.html.erb , as shown in Listing 5-65.<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<style>

body {

font-family: 'Lato','Helvetica Neue',Helvetica,Arial,sans-serif;

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.