katana 是一个纯 C 语言实现的 CSS 解析器。
示例代码:
#include "katana.h" int main() { const char* css = "selector { property: value }"; KatanaOutput* output = katana_parse(css, strlen(css), KatanaParserModeStylesheet); // Do stuff with output, eg. print the input style katana_dump_output(output); katana_destroy_output(output); }