任何人都可以通过调整beautifyrc文件的设置来帮助我解决如何在每个CSS块之后(在结束大括号之后)添加新的空格?
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;
}
我希望在" .return-btn"的结束时间之后有一个新的空格。当我美化我的.scss。
我在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文件中。
答案 0 :(得分:0)
似乎此功能现在无法使用且已经请求,请参阅newline_between_rules support for Sass (enhancement)以获取更多信息。