oxc-css-parser
oxc-css-parser parses CSS, SCSS, Sass, and Less. It produces an AST and does not compile preprocessor syntax to CSS.
Example
use ;
let mut parser = new;
let ast = parser..unwrap;
println!;
More examples are available in examples.
For detailed API documentation, see docs.rs.
Benchmark
The benchmark suite compares parser performance against other CSS parsers.
Install cargo-criterion, then add CSS files to a local bench_data directory:
Credits
Tests come from:
License
MIT License
Copyright (c) 2022-present Pig Fang