leaysgur dffa4b329f feat(formatter_css): implement oxc_formatter_css (#23320)
- Implement `oxc_formatter_css` crate
- Use `raffia` crate
  - https://github.com/g-plane/raffia
  - Supports CSS, LESS and SCSS
- Prettier uses `postcss` for parser
  - https://github.com/prettier/prettier/blob/1c6ba5539141552e0e8e22d401ea620d8fdff468/package.json#L100-L105

Since design of `postcss`, this parser is very lenient with syntax.
Because of this, the AST is also less detailed, so formatting processes often rely on text-based.

On the other hand, `raffia` is relatively strict, so it cannot parse some postcss plugin syntax.

While this part clearly creates a difference from Prettier, we have judged that it is not an issue since it still supports major plugins syntax and aligns with current trends.
2026-06-29 03:15:23 +00:00
…
…
…
…
…
…
…
…
…
…
…



Oxc logo


MIT licensed Build Status Code Coverage CodSpeed Badge Sponsors

Discord chat Playground Website

⚓ Oxc

/oʊ ɛks siː/

The Oxidation Compiler is a collection of high-performance tools for JavaScript and TypeScript written in Rust.

Oxc is part of VoidZero's vision for a unified, high-performance toolchain for JavaScript. It powers Rolldown (Vite's bundler) and enables the next generation of ultra-fast development tools that work seamlessly together.

For more information, check out our website at oxc.rs.

* Oxidation is the chemical process that creates rust

🙋 Who's using Oxc?

Rolldown and Nuxt use Oxc for parsing. Rolldown also uses Oxc for transformation and minification. Nova, swc-node, and knip use oxc_resolver for module resolution. Preact, Shopify, ByteDance, and Shopee use oxlint for linting.

See more projects using Oxc →

🔧 Lint or Format a Codebase

  • Lint: Oxlint — npx oxlint@latest
  • Format: Oxfmt — npx oxfmt@latest

🧰 Build Tooling on Top of Oxc

  • Parse JavaScript and TypeScript: Parser
  • Transform TypeScript, JSX, and modern JavaScript: Transformer
  • Minify JavaScript for production builds: Minifier
  • Resolve modules for JavaScript and TypeScript: Resolver

✍️ Contribute

Check out some of the good first issues or ask us on Discord.

See CONTRIBUTING.md for guidance, or read the complete contributing guide on our website →

If you are unable to contribute by code, you can still participate by:

📚 Other Resources

❤ Who's Sponsoring Oxc?

My sponsors

📖 License

Oxc is free and open-source software licensed under the MIT License.

Thank you to namespace.so for powering our CI/CD pipelines with fast, free macOS and Linux runners.

Oxc ports or copies code from other open source projects, their licenses are listed in Third-party library licenses.

Languages
Rust 80.6%
JavaScript 12.3%
TypeScript 7%