Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Format:CSS/LESS/SCSSNew to Visual Studio Code? Get it now.
Format:CSS/LESS/SCSS

Format:CSS/LESS/SCSS

chencaize

|
289 installs
| (1) | Free
use js-beautify to format style files(css/less/scss)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Format: CSS/LESS/SCSS

use js-beautify to format files(css/less/scss)

Installation

Install through VS Code extensions. Search for formats.

Usage

On Windows:

  1. CTRL + Shift + P -> Format Document
  2. CTRL + ALT + F

On Mac:

  1. CMD + Shift + P -> Format Document
  2. CMD + ALT + F

Extension Settings

Setting Type Default
formatStyle.enable Boolean true
formatStyle.indent_size Number 4
formatStyle.indent_char String ' '
formatStyle.eol String 'auto'
formatStyle.indent_level Number 0
formatStyle.indent_with_tabs Boolean false
formatStyle.preserve_newlines Boolean true
formatStyle.max_preserve_newlines Number 32786
formatStyle.space_in_paren Boolean false
formatStyle.space_in_empty_paren Boolean false
formatStyle.jslint_happy Boolean false
formatStyle.space_after_anon_function Boolean false
formatStyle.space_after_named_function Boolean false
formatStyle.brace_style String "brace_style"
formatStyle.unindent_chained_methods Boolean false
formatStyle.break_chained_methods Boolean false
formatStyle.keep_array_indentation Boolean false
formatStyle.unescape_strings Boolean false
formatStyle.wrap_line_length Number 0
formatStyle.wrap_attributes Array ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
formatStyle.e4x Boolean false
formatStyle.end_with_newline Boolean false
formatStyle.comma_first Boolean false
formatStyle.operator_position Array ["before-newline", "after-newline", "preserve-newline"]
formatStyle.indent_empty_lines Boolean false
formatStyle.templating [String|Array] ["auto"]
formatStyle.selector_separator_newline Boolean true
formatStyle.newline_between_rules Boolean true
formatStyle.space_around_combinator Boolean true

Release Notes

Version Notes
1.0.0 init
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft