Skip to main content

style

Macro style 

Source
macro_rules! style {
    ($name:expr, $markup:expr) => { ... };
}
Expand description

Defines a named style in the global registry.

Parses $markup as a farben markup string and stores the resulting Style under $name. Panics if the markup is invalid.

§Example

style!("danger", "[bold red]");
// [danger] in markup now expands to bold red text