首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Beautifyrc SCSS在关闭大括号后添加新的白线

Beautifyrc SCSS在关闭大括号后添加新的白线
EN

Stack Overflow用户
提问于 2016-09-11 20:53:42
回答 1查看 347关注 0票数 0

有没有人可以帮我在每个CSS块后(在右大括号之后)添加一个新的空格,方法是调整beautifyrc file的设置?

SCSS-问题:

代码语言:javascript
复制
.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中的当前设置:

代码语言:javascript
复制
{
"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中添加。

EN

回答 1

Stack Overflow用户

发布于 2017-07-08 13:22:11

此功能现在似乎不可用,并且已被请求,有关详细信息,请参阅newline_between_rules support for Sass (enhancement)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39436307

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档