CSS Optimizer

Css Minifier & Optimizer

This resource is an implementation of a fast open source CSS optimizer written in Rust.

CSS minify

CSS minification library based on nom. This library parses css input, minifies it and applies some level-dependent optimizations to it.

Example:

use css_minify::optimizations::{Minifier, Level};
fn main() {
    assert_eq!(
        Minifier::default().minify(
            r#"
                 #some_id, input {
                     padding: 5px 3px; /* Mega comment */
                     color: white;
                 }
             "#,
            Level::Three
        ),
        Ok("#some_id,input{padding:5px 3px;color:white}".into())
    )
}