I didn't end up finding a use for this 🤷
This originally started as a tool to visualize the parse tree of a css document, but more or less turned into a pretty printer.
The reason I made this project was to compare compilation outputs of various implementations of scss in an effort to switch a codebase from one compiler to another.
This uses:
- reworkcss/css for parsing
- ekalinin/nodeenv for bootstrapping node
$ css-format --help
usage: css-format [-h] filename
positional arguments:
filename
optional arguments:
-h, --help show this help message and exit
Example run:
$ echo 'body{color:red}' > test.css
$ css-format test.css
body {
color: red;
}