internal static StyleDeclaration ParseDeclarations(string declarations, bool quirksMode = false) { var decl = new StyleDeclaration(); AppendDeclarations(decl, declarations, quirksMode); return(decl); }
internal static void AppendDeclarations(StyleDeclaration list, string css, bool quirksMode = false) { var parser = new Parser();//(new StyleSheet(), new StylesheetReader(declarations)) parser.AddRuleSet(list.ParentRule ?? new StyleRule(list)); parser._parsingContext = ParsingContext.InDeclaration; parser.Parse(css); }
public PageRule() { _declarations = new StyleDeclaration(); RuleType = RuleType.Page; }
public StyleRule(StyleDeclaration declarations) { RuleType = RuleType.Style; _declarations = declarations; }
public FontFaceRule() { _declarations = new StyleDeclaration(); RuleType = RuleType.FontFace; }
public KeyframeRule() { Declarations = new StyleDeclaration(); RuleType = RuleType.Keyframe; }