Exemplo n.º 1
0
 public override void AppendToWithOptions(StringBuilder sb, CssRestitution option)
 {
     foreach (var c in Conditions)
     {
         c.AppendToWithOptions(sb, option);
     }
 }
Exemplo n.º 2
0
        public string ToString(CssRestitution options)
        {
            var sb = new StringBuilder();

            AppendToWithOptions(sb, options);
            return(sb.ToString());
        }
Exemplo n.º 3
0
 public override void AppendToWithOptions(StringBuilder sb, CssRestitution option)
 {
     if (Rules == null)
     {
         return;
     }
     foreach (var r in Rules.Where(x => x != null))
     {
         r.AppendToWithOptions(sb, option);
     }
 }
Exemplo n.º 4
0
        public override void AppendToWithOptions(StringBuilder sb, CssRestitution option)
        {
            bool notFirst = false;

            foreach (var s in Selectors)
            {
                if (notFirst)
                {
                    sb.Append(',');
                }
                notFirst = true;
                s.AppendToWithOptions(sb, option);
            }
        }
Exemplo n.º 5
0
        public virtual void AppendToWithOptions(StringBuilder sb, CssRestitution options)
        {
            if (options.HasFlag(CssRestitution.RemoveErrors) && HasError ||
                options.HasFlag(CssRestitution.RemoveInvalid) && !IsValid)
            {
                return;
            }
            if (options.HasFlag(CssRestitution.OriginalWhenErrorOrInvalid) && (HasError || !IsValid))
            {
                sb.Append(OriginalToken);
                return;
            }

            AppendTo(sb);
        }
Exemplo n.º 6
0
 public override void AppendToWithOptions(StringBuilder sb, CssRestitution option)
 {
     if (Selector != null)
     {
         Selector.AppendToWithOptions(sb, option);
     }
     sb.Append('{');
     if (Properties != null)
     {
         foreach (var p in Properties)
         {
             p.AppendToWithOptions(sb, option);
         }
     }
     sb.Append('}');
 }