Skip to main content

new_from_str

Function new_from_str 

Source
pub fn new_from_str(css_string: &str) -> (Css, Vec<CssParseWarnMsg<'_>>)
Expand description

Parses a CSS string into a Css value and a list of recoverable warnings.

Never panics. Syntax errors and unsupported properties are collected as CssParseWarnMsg items rather than causing a hard failure, so the caller always receives a (possibly empty) stylesheet.