Documentation Index
Fetch the complete documentation index at: https://mintlify.com/beautifier/js-beautify/llms.txt
Use this file to discover all available pages before exploring further.
Synopsis
css-beautify command is installed alongside js-beautify when you install the package globally:
js-beautify --type css.
Pass
- as a filename to read from stdin.Options
I/O options
| Flag | Long form | Description |
|---|---|---|
-f | --file | Input file(s). Pass - for stdin. |
-r | --replace | Write output in-place, overwriting the input file. |
-o | --outfile | Write output to a specific file instead of stdout. |
--config | Path to a JSON config file. | |
-q | --quiet | Suppress logging to stdout. |
-h | --help | Show help and exit. |
-v | --version | Show the version number and exit. |
Indentation options
| Flag | Long form | Default | Description |
|---|---|---|---|
-s | --indent-size | 4 | Number of spaces per indentation level. |
-c | --indent-char | " " | Character used for indentation. |
-t | --indent-with-tabs | false | Indent with tabs, overrides -s and -c. |
--indent-empty-lines | false | Keep indentation on empty lines. | |
--editorconfig | false | Use EditorConfig to set options from .editorconfig. |
Output formatting
| Flag | Long form | Default | Description |
|---|---|---|---|
-e | --eol | first newline in file, else \n | Line terminator character(s). |
-n | --end-with-newline | false | End output with a newline. |
-b | --brace-style | collapse | Brace placement: collapse (opening brace on same line as selector) or expand (opening brace on its own line). |
-L | --selector-separator-newline | true | Print each selector in a multi-selector rule on its own line. |
-N | --newline-between-rules | true | Add a blank line between CSS rules. |