Example #1
0
 /// <summary>The <see cref="KeyFramesBlockNode"/> visit implementation</summary>
 /// <param name="keyFramesBlockNode">The key frames block node.</param>
 /// <returns>The modified AST node if modified otherwise the original node</returns>
 public override AstNode VisitKeyFramesBlockNode(KeyFramesBlockNode keyFramesBlockNode)
 {
     _printerFormatter.AppendLine();
     _printerFormatter.IncrementIndentLevel();
     _printerFormatter.WriteIndent();
     _printerFormatter.Append(string.Join(CssConstants.Comma.ToString(), keyFramesBlockNode.KeyFramesSelectors));
     _printerFormatter.AppendLine();
     _printerFormatter.WriteIndent();
     _printerFormatter.Append(CssConstants.OpenCurlyBracket);
     _printerFormatter.AppendLine();
     _printerFormatter.IncrementIndentLevel();
     keyFramesBlockNode.DeclarationNodes.ForEach((declarationNode, last) =>
     {
         var result = declarationNode.Accept(this);
         if (!last && result != null)
         {
             _printerFormatter.AppendLine(CssConstants.Semicolon);
         }
     });
     _printerFormatter.AppendLine();
     _printerFormatter.DecrementIndentLevel();
     _printerFormatter.WriteIndent();
     _printerFormatter.Append(CssConstants.CloseCurlyBracket);
     _printerFormatter.DecrementIndentLevel();
     return(keyFramesBlockNode);
 }
Example #2
0
 /// <summary>The <see cref="KeyFramesBlockNode"/> visit implementation</summary>
 /// <param name="keyFramesBlockNode">The key frames block node.</param>
 /// <returns>The modified AST node if modified otherwise the original node</returns>
 public virtual AstNode VisitKeyFramesBlockNode(KeyFramesBlockNode keyFramesBlockNode)
 {
     return(keyFramesBlockNode);
 }
 /// <summary>The <see cref="KeyFramesBlockNode"/> visit implementation</summary>
 /// <param name="keyFramesBlockNode">The key frames block node.</param>
 /// <returns>The modified AST node if modified otherwise the original node</returns>
 public override AstNode VisitKeyFramesBlockNode(KeyFramesBlockNode keyFramesBlockNode)
 {
     return(new KeyFramesBlockNode(
                keyFramesBlockNode.KeyFramesSelectors,
                keyFramesBlockNode.DeclarationNodes.Select(declarationNode => (DeclarationNode)declarationNode.Accept(this)).ToSafeReadOnlyCollection()));
 }