Ejemplo n.º 1
0
        private static MatchedRule MatchRule(Dom.ElementData elem, Css.Rule rule)
        {
            var selector = rule.Selectors.FirstOrDefault(s => Matches(elem, s));

            if (selector == null)
            {
                return(null);
            }
            return(new MatchedRule(selector.GetSpecificity(), rule));
        }
Ejemplo n.º 2
0
 public MatchedRule(Css.Specificity specificity, Css.Rule rule)
 {
     Specificity = specificity;
     Rule        = rule;
 }