diff --git a/src/stylesheet.rs b/src/stylesheet.rs index 3286ed5e..cc3c9ec7 100644 --- a/src/stylesheet.rs +++ b/src/stylesheet.rs @@ -44,6 +44,14 @@ pub struct ToCssResult { } impl StyleSheet { + pub fn new(filename: String, rules: CssRuleList, options: ParserOptions) -> StyleSheet { + StyleSheet { + filename, + rules, + options + } + } + pub fn parse<'i>(filename: String, code: &'i str, options: ParserOptions) -> Result>> { let mut input = ParserInput::new(&code); let mut parser = Parser::new(&mut input);