HAML Encoding vs Zen

I read about all HAML vs Zen Coding . Both can save time when entering HTML.

What would be useful to use and why?

+4
source share
3 answers

In fact, you can use Zen Coding to create HAML.

Example:

#main.with-shadow>h1.title+h2.subtitle+p 

Will be done by default:

 <div id="main" class="with-shadow"> <h1 class="title"></h1> <h2 class="subtitle"></h2> <p></p> </div> 

If you want this statement to expand to HAML, add "| haml" to your abbreviation:

 #main.with-shadow>h1.title+h2.subtitle+p|haml 

This should give you the following:

 #main.with-shadow %h1.title %h2.subtitle %p 

Read here to learn more about filters for Zen coding extensions.

+10
source

HAML is a kind of mini markup language, while Zen Coding is a collection of plugins (not a markup language) designed for different editors.

You can use any of them. I personally use Zen Coding.

Quote:

The core of Haml is a lightweight markup language .

-

Zen Coding is an editor plugin for high-speed HTML, XML, XSL (or any other other structured code format) coding and editing. The core of this plugin is a powerful reduction mechanism that allows you to extend expressions like CSS selectors into HTML code.

+2
source

you can use both actually at the same time :) which is fast :)

0
source

Source: https://habr.com/ru/post/1397177/


All Articles