public override CssRule Create(CssToken current)
 {
     var rule = new CssStyleRule(_parser);
     rule.Selector = CreateSelector(ref current);
     FillDeclarations(rule.Style);
     return rule.Selector != null ? rule : null;
 }
示例#2
0
 public CssRule CreateStyle(CssToken current)
 {
     var rule = new CssStyleRule(_parser);
     var start = current.Position;
     _nodes.Push(rule);
     CollectTrivia(ref current);
     rule.Selector = CreateSelector(ref current);
     var end = FillDeclarations(rule.Style);
     rule.SourceCode = CreateView(start, end);
     _nodes.Pop();
     return rule.Selector != null ? rule : null;
 }