0

When trying to use Emmet to do any style settings in an html file, instead of using the autocomplete, it creates a new tab, e.g., if I have the following

<div>

and I want to add a margin of 10px, I add

<div style="m10

then press tab and instead of

<div style="margin:10px;">

I get

<div style="<m10></m10>"

Most of the other Emmet functions, creating lists, div with class, work fine. I'm using Brackets 0.42 and have tried uninstalling and reinstalling Emmet. Any suggestions?

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
Mr.Syrax
  • 396
  • 1
  • 9
  • 26

1 Answers1

0

Based on the Cheat Sheet here you can't do that. The html file only parse emmet magic code like ul>li*4.. or building tags like div [TAB] -> <div></div>

In css as you know you can use m10 [TAB] to get margin: 10px;.

(Styling inline in html isn't a good approach if you can avoid it)

EDIT: What you can actually do to keep your workflow is:

  1. type div [TAB] -> <div></div>
  2. click in the open or closing div
  3. press CTRL+E (Quick Edit) and define a new style in your css file for this specific div. Emmet works in the Quick Edit window as intended.

This is the best valid way.

Biggy
  • 160
  • 6