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 30 31 32 33 34 35 36 37 38 39 40 41 42 43
// ┌───────────────────────────────────────────────────────────────────────────┐
// │ │
// │ ██████╗ ██████╗ ██████╗ Copyright (C) 2022, The Prospective Company │
// │ ██╔══██╗██╔══██╗██╔═══██╗ │
// │ ██████╔╝██████╔╝██║ ██║ This file is part of the Procss library, │
// │ ██╔═══╝ ██╔══██╗██║ ██║ distributed under the terms of the │
// │ ██║ ██║ ██║╚██████╔╝ Apache License 2.0. The full license can │
// │ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ be found in the LICENSE file. │
// │ │
// └───────────────────────────────────────────────────────────────────────────┘
//! 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
//!
//! ```rust
//! 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();
//! ```
mod apply_import;
mod apply_mixin;
mod apply_var;
mod dedupe;
mod filter_refs;
mod flat_self;
mod inline_url;
pub use self::apply_import::apply_import;
pub use self::apply_mixin::apply_mixin;
pub use self::apply_var::apply_var;
pub use self::dedupe::dedupe;
pub use self::filter_refs::filter_refs;
pub(crate) use self::flat_self::flat_self;
pub use self::inline_url::inline_url;