Macro get

Source
macro_rules! get {
    ($file_path:expr) => { ... };
}
Expand description

Gets name mapping for CSS module.

Expects mappings were initialized earlier with css_mod::init!.

§Arguments

  • file_path: relative path to CSS module in posix-style (ie. with forward slash separators).

§Example

// my-component.rs

let css = css_mod::get!("my-component.css");
let global_class_name = css["local-class-name"];