public void FilterErrorList(IList <ICssError> errors, ICssCheckerContext context) { if (errors == null || context == null) { return; } for (int i = errors.Count - 1; i > -1; i--) { ICssError error = errors[i]; if (error.Item == null || error.Item.StyleSheet == null || string.IsNullOrEmpty(error.Item.Text) || !(error.Item.StyleSheet is LessStyleSheet)) { continue; } // Remove errors from using the :extend pseudo class if (error.Item.Text.Contains(":extend(")) { errors.RemoveAt(i); } // Remove errors from using partial selectors else if (error.Item.PreviousSibling != null && error.Item.PreviousSibling.Text == "&") { errors.RemoveAt(i); } } }
public void FilterErrorList(IList <ICssError> errors, ICssCheckerContext context) { for (int i = errors.Count - 1; i > -1; i--) { ICssError error = errors[i]; if (error.Item.StyleSheet is LessStyleSheet && error.Text.Contains(":extend(")) { errors.RemoveAt(i); } } }
public void FilterErrorList(IList <ICssError> errors, ICssCheckerContext context) { for (int i = errors.Count - 1; i > -1; i--) { ICssError error = errors[i]; Declaration dec = error.Item.FindType <Declaration>(); if (dec != null && (dec.Text.Contains("var-") || dec.Text.Contains("var("))) { errors.RemoveAt(i); } } }
public void FilterErrorList(IList <ICssError> errors, ICssCheckerContext context) { for (int i = errors.Count - 1; i > -1; i--) { ICssError error = errors[i]; LessDeclaration dec = error.Item as LessDeclaration; if (dec != null && dec.Text.Contains("&")) { errors.RemoveAt(i); } } }
public void FilterErrorList(IList <ICssError> errors, ICssCheckerContext context) { for (int i = errors.Count - 1; i > -1; i--) { ICssError error = errors[i]; Declaration dec = error.Item.FindType <Declaration>(); if (dec != null && dec.IsValid && dec.PropertyName.Text == "-ms-filter") { errors.RemoveAt(i); errors.Insert(i, CreateNewError(error)); } } }
public void FilterErrorList(IList <ICssError> errors, ICssCheckerContext context) { for (int i = errors.Count - 1; i > -1; i--) { ICssError error = errors[i]; if (error.Item.IsValid) { AtDirective atDir = error.Item.FindType <AtDirective>(); if (atDir != null && atDir.IsValid && atDir.Keyword.Text == "-ms-keyframes") { errors.RemoveAt(i); ICssError tag = new SimpleErrorTag(error.Item, error.Text + _message, CssErrorFlags.TaskListError | CssErrorFlags.UnderlineRed); errors.Insert(i, tag); } } } }
public void FilterErrorList(IList <ICssError> errors, ICssCheckerContext context) { for (int i = errors.Count - 1; i > -1; i--) { ICssError error = errors[i]; if (error.Item.IsValid) { Declaration dec = error.Item.FindType <Declaration>(); if (dec != null && dec.IsValid && dec.PropertyName.Text == "cursor") { if (error.Item.Text == "hand") { errors.RemoveAt(i); errors.Insert(i, CreateNewError(error, "cursorhand")); } else if (error.Item.Text == "normal") { errors.RemoveAt(i); errors.Insert(i, CreateNewError(error, "cursornormal")); } } } } }
private static SimpleErrorTag CreateNewError(ICssError error) { string message = error.Text + " " + " The value must be wrapped in single or double quotation marks."; return new SimpleErrorTag(error.Item, message, CssErrorFlags.TaskListError | CssErrorFlags.UnderlineRed); }
private SimpleErrorTag CreateNewError(ICssError error, string messageKey) { string message = error.Text + " " + _messsages[messageKey]; return new SimpleErrorTag(error.Item, message, CssErrorFlags.TaskListError | CssErrorFlags.UnderlineRed); }
private static SimpleErrorTag CreateNewError(ICssError error) { string message = error.Text + " " + " The value must be wrapped in single or double quotation marks."; return(new SimpleErrorTag(error.Item, message, CssErrorFlags.TaskListError | CssErrorFlags.UnderlineRed)); }
private SimpleErrorTag CreateNewError(ICssError error, string messageKey) { string message = error.Text + " " + _messsages[messageKey]; return(new SimpleErrorTag(error.Item, message, CssErrorFlags.TaskListError | CssErrorFlags.UnderlineRed)); }