Sha256: 73e4a050da913edd37fa671adea26eeaf389c63eaeb802fa57a61af45498ac23
Contents?: true
Size: 727 Bytes
Versions: 25
Compression:
Stored size: 727 Bytes
Contents
module SCSSLint # Checks for spaces following the name of a property and before the colon # separating the property's name from its value. class Linter::SpaceAfterPropertyName < Linter include LinterRegistry def visit_prop(node) offset = property_name_colon_offset(node) return unless character_at(node.name_source_range.start_pos, offset - 1) == ' ' add_lint node, 'Property name should be immediately followed by a colon' end private # Deals with a weird Sass bug where the name_source_range of a PropNode does # not start at the beginning of the property name. def property_name_colon_offset(node) offset_to(node.name_source_range.start_pos, ':') end end end
Version data entries
25 entries across 25 versions & 1 rubygems