Beispiel #1
0
        internal static StyleDeclaration ParseDeclarations(string declarations, bool quirksMode = false)
        {
            var decl = new StyleDeclaration();

            AppendDeclarations(decl, declarations, quirksMode);

            return(decl);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public PageRule()
 {
     _declarations = new StyleDeclaration();
     RuleType      = RuleType.Page;
 }
Beispiel #4
0
 public StyleRule(StyleDeclaration declarations)
 {
     RuleType      = RuleType.Style;
     _declarations = declarations;
 }
Beispiel #5
0
 public FontFaceRule()
 {
     _declarations = new StyleDeclaration();
     RuleType      = RuleType.FontFace;
 }
Beispiel #6
0
 public KeyframeRule()
 {
     Declarations = new StyleDeclaration();
     RuleType     = RuleType.Keyframe;
 }