Exemplo n.º 1
0
        internal static StyleDeclaration ParseDeclarations(string declarations, bool quirksMode = false)
        {
            var decl = new StyleDeclaration();

            AppendDeclarations(decl, declarations, quirksMode);

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