<commit_before># CSSCOMB [![Build Status](https://secure.travis-ci.org/csscomb/csscomb.js.png?branch=master)](http://travis-ci.org/csscomb/csscomb.js)

CSSComb is a coding style formatter for CSS.

## Installation

```bash
npm install csscomb
```

To run `csscomb`, you can use the following command from the project root:

```bash
./node_modules/.bin/csscomb path[ path[...]]
```

```bash
./node_modules/.bin/csscomb --help

  Usage: csscomb [options] <file ...>

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -c, --config [path]  configuration file path
```

## Configuration

`csscomb` is configured using `.csscomb.json` file, located in the project root.

Example configuration:
```json
{
    "exclude": ["node_modules/**"],
    "always-semicolon": true,
    "block-indent": true,
    "colon-space": true,
    "color-case": "lower",
    "color-shorthand": true,
    "leading-zero": false,
    "rule-indent": true,
    "stick-brace": true,
    "strip-spaces": true,
    "unitless-zero": true
}
```

## Options

### always-semicolon

Available value: `{Boolean}` true

Example: `{ "always-semicolon": true }`

```css
/* before */
a { color: red }

/* after */
a { color: red; }
```

### block-indent

**Note**: better to use with [rule-indent](#rule-indent)

Available values:
  * `{Boolean}` true (means 4 spaces)
  * `{Number}` of spaces
  * `{String}` of whitespace characters (`/[ \t]*/`)

Example: `{ "block-indent": 2 }`

```css
/* before */
  a { color: red }
  @media all { a { color: green } }

/* after */
a { color: red
}
@media all {
  a { color: green
  }
}
```

### colon-space

Available values:
  * `{Boolean}` true (means `after`)
  * `{String}`: `before`, `after`, `both` or any combination of whitespaces
  and/or a colon (` `, `: `, `\t:\n\t` etc.)

Example: `{ "colon-space": true }`

```css
/* before */
a { color:red }

/* after */
a { color: red }
```

Example: `{ "colon-space": ":\n\t\t" }`

```css
/* before */
a {
  color: red;
}

/* after */
a {
  color:
    red;
}
```

Example: `{ "colon-space": ":" }`

```css
/* before */
a { color: red }

/* after */
a { color:red }
```

### color-case

Available values: `{String}` `lower` or `upper`

Example: `{ "color-case": "lower" }`

```css
/* before */
a { color: #FFF }

/* after */
a { color: #fff }
```

### color-shorthand

Available values: `{Boolean}` `true` or `false`

Example: `{ "color-shorthand": true }`

```css
/* before */
b { color: #ffcc00 }

/* after */
b { color: #fc0 }
```

### leading-zero

Available values: `{Boolean}` `true` or `false`

Example: `{ "leading-zero": false }`

```css
/* before */
p { padding: 0.5em }

/* after */
p { padding: .5em }
```

### rule-indent

**Note**: better to use with [block-indent](#block-indent)

Available values:
  * `{Boolean}` true (means 4 spaces)
  * `{Number}` of spaces
  * `{String}` of whitespace characters (`/[ \t]*/`)

Example: `{ "rule-indent": 2 }`

```css
/* before */
a { color:red; margin:0 }

/* after */
a {
  color:red;
  margin:0 }
```

## Tests

Run `npm test` for tests.

## Contributing

Anyone and everyone is welcome to contribute. Please take a moment to
review the [guidelines for contributing](CONTRIBUTE.md).

## Authors

[@mishanga](https://github.com/mishanga)

Thanks for assistance and contributions:

[@miripiruni](https://github.com/miripiruni),
[@puzankov](https://github.com/puzankov),
[@L0stSoul](https://github.com/L0stSoul),
[@ignovak](https://github.com/ignovak)

## License

This software is released under the terms of the [MIT license](https://github.com/csscomb/csscomb.js/blob/master/LICENSE).

## Other projects
* https://github.com/senchalabs/cssbeautify
* https://github.com/css/gonzales
* https://github.com/css/csso
<commit_msg>README: stick-brace<commit_after># CSSCOMB [![Build Status](https://secure.travis-ci.org/csscomb/csscomb.js.png?branch=master)](http://travis-ci.org/csscomb/csscomb.js)

CSSComb is a coding style formatter for CSS.

## Installation

```bash
npm install csscomb
```

To run `csscomb`, you can use the following command from the project root:

```bash
./node_modules/.bin/csscomb path[ path[...]]
```

```bash
./node_modules/.bin/csscomb --help

  Usage: csscomb [options] <file ...>

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -c, --config [path]  configuration file path
```

## Configuration

`csscomb` is configured using `.csscomb.json` file, located in the project root.

Example configuration:
```json
{
    "exclude": ["node_modules/**"],
    "always-semicolon": true,
    "block-indent": true,
    "colon-space": true,
    "color-case": "lower",
    "color-shorthand": true,
    "leading-zero": false,
    "rule-indent": true,
    "stick-brace": true,
    "strip-spaces": true,
    "unitless-zero": true
}
```

## Options

### always-semicolon

Available value: `{Boolean}` true

Example: `{ "always-semicolon": true }`

```css
/* before */
a { color: red }

/* after */
a { color: red; }
```

### block-indent

**Note**: better to use with [rule-indent](#rule-indent)

Available values:
  * `{Boolean}` true (means 4 spaces)
  * `{Number}` of spaces
  * `{String}` of whitespace characters (`/[ \t]*/`)

Example: `{ "block-indent": 2 }`

```css
/* before */
  a { color: red }
  @media all { a { color: green } }

/* after */
a { color: red
}
@media all {
  a { color: green
  }
}
```

### colon-space

Available values:
  * `{Boolean}` true (means `after`)
  * `{String}`: `before`, `after`, `both` or any combination of whitespaces
  and/or a colon (` `, `: `, `\t:\n\t` etc.)

Example: `{ "colon-space": true }`

```css
/* before */
a { color:red }

/* after */
a { color: red }
```

Example: `{ "colon-space": ":\n\t\t" }`

```css
/* before */
a {
  color: red;
}

/* after */
a {
  color:
    red;
}
```

Example: `{ "colon-space": ":" }`

```css
/* before */
a { color: red }

/* after */
a { color:red }
```

### color-case

Available values: `{String}` `lower` or `upper`

Example: `{ "color-case": "lower" }`

```css
/* before */
a { color: #FFF }

/* after */
a { color: #fff }
```

### color-shorthand

Available values: `{Boolean}` `true` or `false`

Example: `{ "color-shorthand": true }`

```css
/* before */
b { color: #ffcc00 }

/* after */
b { color: #fc0 }
```

### leading-zero

Available values: `{Boolean}` `true` or `false`

Example: `{ "leading-zero": false }`

```css
/* before */
p { padding: 0.5em }

/* after */
p { padding: .5em }
```

### rule-indent

**Note**: better to use with [block-indent](#block-indent)

Available values:
  * `{Boolean}` true (means 4 spaces)
  * `{Number}` of spaces
  * `{String}` of whitespace characters (`/[ \t]*/`)

Example: `{ "rule-indent": 2 }`

```css
/* before */
a { color:red; margin:0 }

/* after */
a {
  color:red;
  margin:0 }
```

### stick-brace

Available values:
  * `{Boolean}` true (means 1 spaces)
  * `{String}` of whitespace characters (`/[ \t\n]*/`)

Example: `{ "stick-brace": "\n" }`

```css
/* before */
a { color:red }

/* after */
a
{ color:red }
```

## Tests

Run `npm test` for tests.

## Contributing

Anyone and everyone is welcome to contribute. Please take a moment to
review the [guidelines for contributing](CONTRIBUTE.md).

## Authors

[@mishanga](https://github.com/mishanga)

Thanks for assistance and contributions:

[@miripiruni](https://github.com/miripiruni),
[@puzankov](https://github.com/puzankov),
[@L0stSoul](https://github.com/L0stSoul),
[@ignovak](https://github.com/ignovak)

## License

This software is released under the terms of the [MIT license](https://github.com/csscomb/csscomb.js/blob/master/LICENSE).

## Other projects
* https://github.com/senchalabs/cssbeautify
* https://github.com/css/gonzales
* https://github.com/css/csso

{'fraction_non_alphanumeric': 0.20514132241974678, 'fraction_numerical': 0.0037089141833994118, 'mean_word_length': 3.3711570709893794, 'pattern_counts': {'":': 45, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5337513', 'n_tokens_mistral': 2924, 'n_tokens_neox': 2831, 'n_words': 734}