Function grass::from_string
source · pub fn from_string<S>(
input: S,
options: &Options<'_>
) -> Result<String, Box<SassError, Global>>where
S: Into<String>,
Expand description
Compile CSS from a string
fn main() -> Result<(), Box<grass::Error>> {
let css = grass::from_string("a { b { color: &; } }".to_string(), &grass::Options::default())?;
assert_eq!(css, "a b {\n color: a b;\n}\n");
Ok(())
}