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 allocator = default;
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 run the checked-in fixture benchmark:
To benchmark custom inputs, add CSS, SCSS, Sass, or Less files to a local bench_data
directory. When bench_data contains supported files, it is used instead of the
checked-in fixtures.
Credits
Tests come from:
License
MIT License