macro_rules! include { ($path:literal) => { ... }; }
Available on crate feature
macro
only.Expand description
Include CSS in your binary at compile time from a Sass source file
static CSS: &str = grass::include!("../static/_index.scss");
This requires the "macro"
feature, which is not enabled by default.
By default grass
will track files using include_str!
. This allows incremental
compilation to be updated when any Sass files are modified.
If compiling with a nightly version of rust, grass
can make use of
proc_macro::tracked_path
in order to force incremental recompilation, which is more robust and potentially
faster. This is enabled by the "nightly"
feature.
Limitations
Compilation options are not configurable with this macro. The default values for all options are used, except for output style, which is compressed.