A CSS parser, transformer, and minifier written in Rust. Parsing and minifying large files are completed in milliseconds, often with significantly smaller output than other tools. Many other CSS parsers treat property values as an untyped series of tokens. This means that each transformer that wants to do something with these values must interpret them itself, leading to duplicate work and inconsistencies. @parcel/css parses all values using the grammar from the CSS specification and exposes a specific value type for each property. Built on the cssparser and selectors crates created by Mozilla and used by Firefox and Servo. These provide a solid general-purpose CSS-parsing foundation on top of which @parcel/css implements support for all specific CSS rules and properties. One of the main purposes of @parcel/css is to minify CSS to make it smaller. This includes many optimizations.

Features

  • Typed property values
  • Extremely fast
  • Browser-grade parser
  • Minification
  • Combine longhand properties into shorthands where possible
  • Merge adjacent rules with the same selectors or declarations when it is safe to do so

Project Samples

Project Activity

See All Activity >

License

Mozilla Public License 1.0 (MPL)

Follow parcel/css

parcel/css Web Site

Other Useful Business Software
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of parcel/css!

Additional Project Details

Programming Language

Rust

Related Categories

Rust Build Tools, Rust Compilers

Registered

2022-05-24