我正在尝试创建Emmet(+ TAB)快捷方式,我已完成90%。我只是想不通如何使最后的嵌套元素排成一行。标签,输入和结束div标签都在一行上。我想将它们全部放在单独的行中
snippet.json代码
"form+": "section.form-container>div.form-wrapper>form:post>(div.form-group>label+inp)+btn:s"
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<section class="form-container">
<div class="form-wrapper">
<form action="" method="post">
<div class="form-group"><label for=""></label><input type="text" name="" id=""></div>
<button type="submit"></button>
</form>
</div>
</section>
试图使其自动看起来像这样
<section class="form-container">
<div class="form-wrapper">
<form action="" method="post">
<div class="form-group">
<label for=""></label>
<input type="text" name="" id="">
</div>
<button type="submit"></button>
</form>
</div>
</section>
</body>
</html>
在这种情况下,元素布局由inline_break
的output profile选项控制,该选项对Emmet扩展的所有代码片段全局起作用。您可以将inline_break
减小为2
,这将导致元素按预期方式布局