7
7
7GIT2020-11-07 03:23:33
Visual Studio Code
7GIT, 2020-11-07 03:23:33

How to disable line (class) wrapping when formatting CSS in VSCODE?

How to disable class wrapping on newline when formatting CSS in VSCODE?

An example for clarity
Like now:
body,
.body {
  ...
}

It should be:
body, .body {
  ...
}


My settings.json
{
  "update.enableWindowsBackgroundUpdates": false,
  "update.mode": "none",
  "editor.formatOnSave": true,
  "editor.formatOnType": true,
  "[html]": {
    "editor.defaultFormatter": "vscode.html-language-features"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[json]": {
    "editor.defaultFormatter": "vscode.json-language-features"
  },
  "workbench.startupEditor": "newUntitledFile",
  "editor.renderControlCharacters": true,
  "editor.renderWhitespace": "all",
  "files.autoSave": "onWindowChange",
  "editor.tabSize": 3,
  "editor.insertSpaces": false,
  "editor.detectIndentation": false,
  "editor.hover.enabled": false,
  "editor.mouseWheelZoom": true,
  "workbench.editor.closeEmptyGroups": false,
  "vscodeGoogleTranslate.preferredLanguage": "Russian",
  "vscodeGoogleTranslate.HoverTranslations": true,
  "editor.renameOnType": true,
  "workbench.colorTheme": "GitHub Dark",
  "liveServer.settings.donotShowInfoMsg": true,
  "livePugCompiler.savePath": "/html",
  "liveServer.settings.donotVerifyTags": true,
  "liveSassCompile.settings.formats": [
    {
      "extensionName": ".css",
      "format": "expanded",
      "savePath": "/dist/assets/css"
    }
  ],
  "liveSassCompile.settings.includeItems": [
    "src/bundle.sass"
  ],
  "liveSassCompile.settings.excludeList": [
    "**/node_modules/**",
    ".vscode/**",
    ".git/**"
  ],
  "liveSassCompile.settings.generateMap": false,
  "liveSassCompile.settings.autoprefix": [
    "> 1%",
    "last 10 versions"
  ],
  "emmet.triggerExpansionOnTab": true,
  "html.format.wrapLineLength": 0,
  "CSSNavigation.searchAcrossWorkspaceFolders": true,
  "explorer.confirmDragAndDrop": false,
  "explorer.sortOrder": "type"
}

Thanks to all!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question