Skip to content

About

No description, website, or topics provided.

Resources

Security policy

Stars

15 stars

Watchers

2 watching

Forks

Repository files navigation

oxc-css-parser

This project is a fork of g-plane/raffia for Oxfmt.

Crates.io docs.rs

oxc-css-parser parses CSS, SCSS, Sass, and Less. It produces an AST and does not compile preprocessor syntax to CSS.

How it parses, and why, is in AGENTS.md.

Example

use oxc_css_parser::{Allocator, Parser, Syntax, ast::Stylesheet};

let allocator = Allocator::default();
let mut parser = Parser::new(&allocator, "a { color: green }", Syntax::Css);
let ast = parser.parse::<Stylesheet>().unwrap();
println!("{:#?}", ast);

More examples are available in examples.

Credits

Tests come from:

License

MIT License

Our sponsors

About

No description, website, or topics provided.

Resources

Security policy

Stars

15 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages