public override void AppendToWithOptions(StringBuilder sb, CssRestitution option) { foreach (var c in Conditions) { c.AppendToWithOptions(sb, option); } }
public string ToString(CssRestitution options) { var sb = new StringBuilder(); AppendToWithOptions(sb, options); return(sb.ToString()); }
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); } }
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); } }
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); }
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('}'); }