vs code里面有什么插件可以格式scss成紧凑模式

hech
  • 78

sublime有插件可以,vscode有什么插件可以做到吗?主要找到插件后怎么设置快捷键一键格式化
图片描述

比如吧上面的scss格式成下面这种格式
图片描述

回复
阅读 3.1k
1 个回答

csscomb

https://marketplace.visualstu...

"csscomb.preset": {
        "always-semicolon": true,
        "color-case": "upper",
        "block-indent": 4,
        "color-shorthand": false,
        "eof-newline": true,
        "leading-zero": false,
        "quotes": "double",
        "sort-order-fallback": "abc",
        "sort-order": [
            [
                "$include"
            ],
            [
                "position"
            ],
            [
                "...",
                "border"
            ],
            [
                "font"
            ],
            [
                "$variable"
            ]
        ],
        "space-before-colon": "","space-after-colon":" ","space-before-combinator":" ","space-after-combinator":" ","space-between-declarations":" ","space-before-opening-brace":" ","space-after-opening-brace":" ","space-after-selector-delimiter":" ","space-before-selector-delimiter":"",
        "space-before-closing-brace": "","strip-spaces": true,"tab-size": true,"vendor-prefix-align": true
    },
    "csscomb.supportEmbeddedStyles": false,
    "csscomb.syntaxAssociations": {},
宣传栏