/// <summary> /// Used to convert a CssBuilder into a null when it is empty. /// Usage: class=null causes the attribute to be excluded when rendered. /// </summary> /// <param name="builder"></param> /// <returns>string</returns> public static string NullIfEmpty(this CssBuilder builder) => string.IsNullOrEmpty(builder.ToString()) ? null : builder.ToString();