
6
Is anyone interested in learning about Haml in email?
I just published my Sass guide in the learning centre (check it out!)
I'm wondering if anyone is interested in Haml, it's a short hand way of writing Haml so instead of this:
<table width="640" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="images/image.png" alt="Description of image" border="0" style="display:block;">
</td>
</tr>
<tr>
<td>
<img src="images/image.png" alt="Description of image" border="0" style="display:block;">
</td>
</tr>
<tr>
<td>
<img src="images/image.png" alt="Description of image" border="0" style="display:block;">
</td>
</tr>
</table>
You can write this:
%table{'width' => "640", 'cellpadding' => "0", 'cellspacing' => "0", 'border' => "0"}
%tr
%td
%img{'src' => "images/image.png", 'alt' => "Description of image", 'border' => "0", 'style' => "display:block"}
%tr
%td
%img{'src' => "images/image.png", 'alt' => "Description of image", 'border' => "0", 'style' => "display:block"}
%tr
%td
%img{'src' => "images/image.png", 'alt' => "Description of image", 'border' => "0", 'style' => "display:block"}
If enough people want it, I'll do a write up.
I, for one, would love to see a write up. It's always fun to see how other designers develop email, especially when it's such a modern workflow.
Yeah I'd be up for seeing that.
Got plans to set up a new Grunt, SASS, HAML workflow next month.
Awesome, I'll get it up soon.
Just adding some resources to this thread.
Dan Denney has posted his workflow which uses Haml in a blog post here - Github repo for it here.
Danny Prose also has created Middleman 3.0.x Project Template: HTML Email Boilerplate HAML.
looks interesting but will this be recognized by all email clients, devices, etc out there?
Hi Vic,
Yes. It's a short-hand way of writing HTML that is actually compiled at the end of the build into regular HTML!
An introduction to Haml is here if you're interested.