# CSS minifier

Shrink CSS by removing comments and needless white space, leaving strings and url(...) values intact.

- Endpoint: `POST https://setget.net/v1/tools/css-minify` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `css-minify`
- Page: https://setget.net/tools/css-minify

## Inputs

- `text` (required, string): The CSS to minify.

## Example

```json
{"input":{"text":"a {\n  color: red;  /* brand */\n  margin: 0 auto;\n}\n\n.b > .c, .d { background: url( img/a b.png ) }"}}
```

Result:

```json
{"text":"a{color:red;margin:0 auto}.b > .c,.d{background:url(img/a b.png)}","bytes_before":98,"bytes_after":65,"saved":33,"saved_percent":33.7}
```

**Does it rename or merge anything?** No. Only comments and white space that cannot matter are removed, plus the last semicolon in each block. Selectors, values and their order stay as written.

**Which comments survive?** Comments that start with /*! are kept, because that marks licence notices.

**Why is the space around > or + kept?** Inside calc() those spaces are required, so they are left alone everywhere to be safe.
