I read about both HAML vs Zen Coding. Both can save time in typing HTML.
Which would be good to use and why?
One can actually use Zen Coding to produce HAML.
Example:
#main.with-shadow>h1.title+h2.subtitle+p
Will produce, by default:
<div id="main" class="with-shadow">
<h1 class="title"></h1>
<h2 class="subtitle"></h2>
<p></p>
</div>
If you would like that statement to expand to HAML, append "|haml" to your abbreviation:
#main.with-shadow>h1.title+h2.subtitle+p|haml
That should give you the following:
#main.with-shadow
%h1.title
%h2.subtitle
%p
Read here to learn more about filters for the Zen Coding expansions.
HAML is kind of mini markup language whereas Zen Coding is collection of plugins (not markup language) made for various editors.
You can use either of them. I personally use Zen Coding though.
Quote:
At its core, Haml is a lightweight markup language.
--
Zen Coding is an editor plugin for high-speed HTML, XML, XSL (or any other structured code format) coding and editing. The core of this plugin is a powerful abbreviation engine which allows you to expand expressions—similar to CSS selectors—into HTML code.
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