1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
//! CSS minification library based on `nom`
//! This library parses css input, minifies it and applies some level-dependent optimizations to it.
//!
//! ```rust
//! use css_minify::optimizations::{Minifier, Level};
//! assert_eq!(
//! Minifier::default().minify(
//! r#"
//! #some_id, input {
//! padding: 5px 3px; /* Mega comment */
//! color: white;
//! }
//!
//!
//! /* this is are test id */
//! #some_id_2, .class {
//! padding: 5px 4px; /* Mega comment */
//! Color: rgb(255, 255, 255);
//! }
//! "#,
//! Level::Three
//! ),
//! Ok("#some_id,input{padding:5px 3px;color:white}#some_id_2,.class{padding:5px 4px;color:#fff}".into())
//! )
//! ```
pub mod optimizations;
pub(crate) mod parsers;
pub(crate) mod structure;