Module procss::transformers

source ·
Expand description

A collection of transformer functions, utilizing the crate::ast::Css::transform and crate::ast::Tree::transform methods to apply various useful transformations on their respective structs. The exports from crate::transformers are functions which take a &mut to either crate::ast::Css or crate::ast::Tree.

Example

use procss::transformers::apply_mixin;
use procss::{parse, RenderCss};

let mut tree = parse("div{color:red}").unwrap();
apply_mixin(&mut tree);
let css = tree.flatten_tree().as_css_string();

Functions