Re:Haml Sucks for Content
by coderdude on Monday February 08, 2010 @01:18PM
(#1110279)
Does Haml allow you to control how the actual markup is produced? Some browsers are dependent on a lack of whitespace between nodes in order to render properly without adding some extra padding (IE for instance). For me, the main issue is control over my markup. Exact and precise control, which is necessary.
[ Parent
| on HN ]
Re:Haml Sucks for Content
by chriseppstein on Monday February 08, 2010 @01:54PM
(#1110360)
You can use the alligator operators to trim surrounding and internal whitespace. E.g.
.foo> This has no whitespace outside the foo div.
.foo< This has no whitespace just inside the foo div.
.foo>< This has no whitespace outside or inside.
http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#wh...Incredible, they even thought of that. I guess Haml isn't so bad after all. Time to check it out.
Re:Haml Sucks for Content
by jerhinesmith on Monday February 08, 2010 @01:48PM
(#1110354)
Haml does allow for finer-grained control over whitespace, but even if that's not enough, when needed you can still "embed" plain-old html directly inside of your Haml files.
I guess I fail to see how html has any advantage over haml. The absolute worst case is that you're still writing html in 90+% of the cases (which you'd be doing anyway without haml), and in the best case, your markup becomes much more DRY and readable.
Well, I seem to always have formatting issues with haml, though probably because I haven't worked enough with haml yet to internalize the whitespace rules. No such issues with html of course. Not a huge advantage, but can make it annoying when you're first starting with haml.
HTML has an advantage because that's what people know, particularly designers.
Some designers I've worked with are ok with haml, others steadfastly refuse because their workflow is so HTML-centric.
Re:Haml Sucks for Content
by chriseppstein on Monday February 08, 2010 @02:49PM
(#1110482)
Tool support is a good reason to not use haml. I expect tool support will be there some day, but it's not really there yet. RubyMine has very nice haml support tho.