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
- Apply any in-scope mixin (defined using
@mixin) to any@includein theTreeinput. Similar to Sass@mixin - Inline
url()rule properties containing local paths to be replace with the base64 encoded contents of their respective files.