Macro css_modules::css_module

source ยท
macro_rules! css_module {
    ($stylesheet:expr) => { ... };
    ($name:expr, $stylesheet:expr) => { ... };
}
Expand description

Make a [Stylesheet] from a string.

use css_modules::*;

let css = css_module!(".myClass { font-weight: bold; color: red; }");

// Get the localised class name:
css.id("myClass").unwrap();

// Get the module stylesheet as a string:
format!("{}", css);