有没有人可以帮我在每个CSS块后(在右大括号之后)添加一个新的空格,方法是调整beautifyrc file的设置?
SCSS-问题:
.return-btn {
background-color: #ACE514 !important;
border: 0;
border-bottom: 3px solid #1F8619 !important;
border-radius: 0;
font-size: 18px;
margin: 50px 0 50px 0;
}
.return-btn:hover {
background-color: #ACE514 !important;
border-bottom: 3px solid #1F8619 !important;
}
当我美化我的.scss时,我希望在".return-btn“的结束括号后有一个新的空格。
我在default.jsbeautifyrc中的当前设置:
{
"js": {
"eol": "\n",
"preserve_newlines": true,
"max_preserve_newlines": 10,
"space_after_anon_function": true,
"brace_style": "collapse",
"keep_array_indentation": true,
"keep_function_indentation": false,
"space_before_conditional": true,
"break_chained_methods": false,
"eval_code": false,
"unescape_strings": false,
"wrap_line_length": 0,
"wrap_attributes": "auto",
"end_with_newline": true,
"comma_first": false
},
"css": {
"allowed_file_extensions": ["css", "scss", "sass", "less"],
"eol": "\\n",
"end_with_newline": true,
"selector_separator_newline": true,
"newline_between_rules": true,
"smartIndent": false,
"indent_char": " ",
"indent_size": 2,
"selector_separator": " "
},
"html": {
"eol": "\n",
"end_with_newline": true,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"indent_inner_html": false,
"brace_style": "collapse",
"indent_scripts": "normal",
"wrap_line_length": 0,
"wrap_attributes": "auto"
}
}
当我格式化输出的css文件本身时,每个右大括号后面都会添加一个换行符,但不会在scss-file中添加。
发布于 2017-07-08 13:22:11
此功能现在似乎不可用,并且已被请求,有关详细信息,请参阅newline_between_rules support for Sass (enhancement)。
https://stackoverflow.com/questions/39436307
复制相似问题