VS Code:格式化scss的最佳方法(使用Beautify插件)?

时间:2018-03-16 17:30:09

标签: sass visual-studio-code

在格式化scss文件的VS代码中,内容搞砸了:

格式化:

$font-family        : Helvetica Neue, Helvetica, Arial, sans-serif;
$font-family-alt    : Open Sans, Helvetica Neue, Helvetica, Arial, sans-serif;
$font-size          : 1.3rem;
$font-size-sm       : 1.1rem;

$gray-base      : #000 !default;
$gray-darker    : lighten($gray-base, 13.5%) !default; // #222
$gray-dark      : lighten($gray-base, 20%) !default; // #333

格式化命令后:

$font-family: Helvetica Neue,
Helvetica,
Arial,
sans-serif;
$font-family-alt: Open Sans,
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
$font-size: 1.3rem;
$font-size-sm: 1.1rem;

$gray-base: #000 !default;
$gray-darker: lighten($gray-base, 13.5%) !default; // #222
$gray-dark: lighten($gray-base, 20%) !default; // #333

我怎样才能达到相反的目的?

.jsbeautifyrc的内容:

{
    "indent_with_tabs": true,
    "max_preserve_newlines": 2,
    "preserve_newlines": true,
    "keep_array_indentation": true,
    "break_chained_methods": true,
    "wrap_line_length": 120,
    "end_with_newline": true,
    "brace_style": "collapse,preserve-inline",
    "unformatted": ["a"],
    "wrap_attributes": "force-aligned",
    "wrap_attributes_indent_size": "true"
}

提前致谢!

0 个答案:

没有答案