Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get emmet to recognize spaces inside a class name when expanding?

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?

like image 240
David Provost Avatar asked Mar 11 '15 19:03

David Provost


People also ask

How do I set attributes in Emmet?

You can place as many attributes as you like inside square brackets. You don't have to specify attribute values: td[colspan title] will produce <td colspan="" title=""> with tabstops inside each empty attribute (if your editor supports them). You can use single or double quotes for quoting attribute values.

Why should you never include a space in a CSS class name?

The attribute, if specified, must have a value that is a set of space-separated tokens representing the various classes that the element belongs to. So when the HTML is parsed, any class name that includes a space would end up being parsed as two different classes.

What is Emmet syntax?

Emmet uses a specific syntax in order to expand small snippets of code, similar to CSS selectors, into full-fledged HTML code. For example, the sequence. div#page>div.logo+ul#navigation>li*5>a. or. #page>.logo+ul#navigation>li*5>a.


1 Answers

Instead of using a space, use a dot.

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

like image 111
David Provost Avatar answered Sep 25 '22 17:09

David Provost