CSS解析树的可视化
项目描述
css-explore
这个项目最初是一个用于可视化CSS文档解析树的工具,但基本上变成了一个漂亮的打印器。
我创建这个项目的目的是比较不同实现中的scss编译输出,以便将代码库从一种编译器切换到另一种编译器。
本程序使用
- reworkcss/css 进行解析
- ekalinin/nodeenv 用于启动node
用法
$ css-format --help
usage: css-format [-h] filename
positional arguments:
filename
optional arguments:
-h, --help show this help message and exit
示例运行
$ echo 'body{color:red}' > test.css
$ css-format test.css
body {
color: red;
}