lib/scss_lint/linter/shorthand.rb in scss_lint-0.48.0 vs lib/scss_lint/linter/shorthand.rb in scss_lint-0.49.0
- old
+ new
@@ -66,9 +66,12 @@
# @param prop [String]
# @param node [Sass::Script::Value::String]
# @param values [Array<String>]
def check_shorthand(prop, node, values)
+ add_lint(node, "Shorthands of length `#{values.count}` are not allowed. " \
+ "Value was `#{values.join(' ')}`") unless allowed?(values.count)
+
return unless (2..4).member?(values.count)
shortest_form = condensed_shorthand(*values)
return if values == shortest_form