lib/scss_lint/linter/property_units.rb in scss-lint-0.36.0 vs lib/scss_lint/linter/property_units.rb in scss-lint-0.36.1

- old
+ new

@@ -16,10 +16,11 @@ # Handle nested properties by ensuring the full name is extracted if @nested_under property = "#{@nested_under}-#{property}" end - if units = node.value.value.to_s[/(?:\d+|\d*\.?\d+)([a-z%]+)/i, 1] + if node.value.respond_to?(:value) && + units = node.value.value.to_s[/(?:^|\s)(?:\d+|\d*\.?\d+)([a-z%]+)/i, 1] check_units(node, property, units) end @nested_under = property yield # Continue linting nested properties