9

If I type .myClass and press tab emmet expands this how it should... but if I type .myClass class2 it does not expand because there is a space. How can I add two classes to a div with emmet?

David Provost
  • 317
  • 2
  • 11

3 Answers3

16

Instead of using a space, use a dot.

http://www.sitepoint.com/faster-workflow-mastering-emmet-part-3/

David Provost
  • 317
  • 2
  • 11
0

You can chain multiple classes using dot insted of space.

Like that:

.myClass.class2

The result shoud be:

<div class="myClass class2"></div>
0

First of all: Emmet don't allow spaces. Second: Emmet uses normal CSS style, just add a dot before any class you need.

Emmet has more options, but with common CSS you can put tags, classes, id, attributes, etc.

Willem Franco
  • 854
  • 9
  • 7