Beispiel #1
0
 public void AddRuleSet(RuleSet set)
 {
     foreach (var selector in set.Selectors)
     {
         if (selector.PseudoElementSelector != null)
         {
             var pseudoSelector = selector.PseudoElementSelector;
             if (pseudoSelector.Name == "before")
             {
                 AddPseudoElement(selector.ToStringWithoutPseudoElementSelector(), set.Declaration, (n, h) => _dom.InsertBefore(n, h));
             }
             else if (pseudoSelector.Name == "after")
             {
                 AddPseudoElement(selector.ToStringWithoutPseudoElementSelector(), set.Declaration, (n, h) => _dom.InsertAfter(n, h));
             }
         }
         else
         {
             AddStyle(selector, set.Declaration);
         }
     }
 }