macro_rules! load_tailwind {
(always) => { ... };
(always, $path:literal) => { ... };
(jit) => { ... };
() => { ... };
($path:expr) => { ... };
}
Expand description
automaticly loads tailwind, depending on the config the macro should be called in the head to the html doc:
// example for maud
html! {
(DOCTYPE);
html {
head {
(load_tailwind!());
}
body {
div."w-prose mx-auto" { "Tailwind just works" }
}
}
}
the actual way of loading the file depends on the compile mode (debug_assertions or not) in debug the compilation is skipped as to not slow down the build
calling load_tailwind!(jit)
forces jit
calling load_tailwind!(always)
has the same behaviour as include_html!(always)
(never loads using Jit
)