Post

Zen Coding Emmet Cheatsheet

Speed up your coding with emmet zen coding automation.

Type your emmet scripts then hit tab to execute them.

Nesting

place element inside previous element

  • place element along side previous element

grouping

1
(.foo>h1)+(.bar>h2) 

will output this:

1
2
3
4
5
6
<div class="foo">
  <h1></h1>
</div>
<div class="bar">
  <h2></h2>
</div>

multiply

1
ul>li*3
1
2
3
4
5
<ul>
  <li></li>
  <li></li>
  <li></li>
</ul>

Numbering

1
ul>li.item$*3
1
2
3
4
5
<ul>
  <li class="item1"></li>
  <li class="item2"></li>
  <li class="item3"></li>
</ul>

implicit html tags

li for ul and ol tr for table, tbody, thead and tfoot td for tr option for select and optgroup

css

1
w100 

will generate:

1
width: 100px;
1
h10p+m5e 

will generate:

1
2
height: 10%;
margin: 5em;
1
@f 

will generate:

1
2
3
4
@font-face {
font-family:;
src:url();
}
1
ov:h and ov-h and ovh 

will generate:

1
2
overflow: hidden;

prefixes

1
-

will generate:

1
2
3
4
5
-webkit-super-foo: ;
-moz-super-foo: ;
-ms-super-foo: ;
-o-super-foo: ;
super-foo: ;

gradients

1
lg(left, #fff 50%, #000) 

will generate:

1
2
3
4
5
background-image: -webkit-gradient(linear, 0 0, 100% 0, color-stop(0.5, #fff), to(#000));
background-image: -webkit-linear-gradient(left, #fff 50%, #000);
background-image: -moz-linear-gradient(left, #fff 50%, #000);
background-image: -o-linear-gradient(left, #fff 50%, #000);
background-image: linear-gradient(left, #fff 50%, #000);

lorum ipsum

1
lorem10 

will generate:

1
2
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Libero delectus.
1
p*3>lorem5 will generate
1
2
3
<p>Lorem ipsum dolor sit amet.</p>
<p>Voluptates esse aliquam asperiores sunt.</p>
<p>Fugiat eaque laudantium explicabo omnis!</p>
This post is licensed under CC BY 4.0 by the author.