I love writing my pens in Haml, but I still have a hard time remembering the syntax. This post is a reference guide of all the fun Haml snippets that I have used to date. (I will update this post as I do more Haml explorin'.)

Basic Element Syntax

Variables

String

Date

Time

Loops/Arrays

X times

Looping through an array

Looping through multi-dimensional arrays

Looping and zipping two arrays

Looping and zipping three arrays

Combination & Join

Case statements

Internal SCSS

Haml + AngularJS


8,757 4 76