I want to be able to have two Haml elements on the same line. For example:
%h1 %a{:href => '/'} Professio.
That doesn't work. How would I get something like this to work without borking?
Haml cannot do this. Slim can:
h1: a( href='/' ) Professio.
is the same as:
h1
a( href="/ ) Professio
You can write as deeper tree as you need:
ul.nav
li.active: a( href="/home" ): strong Home
li: a( href="/contact" ): span Contact
Jade also has similar syntax and support this feature, but it's been designed for Node.js environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With