Sha256: 1ca71cc7ef0d4dce414be1fb35fef6733697b808a3ef6566940a9429887a5b57

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

require 'sass'

module SCSSLint
  class Linter::BorderZeroLinter < Linter
    include LinterRegistry

    def visit_prop(node)
      return unless BORDER_PROPERTIES.include? node.name.first.to_s
      add_lint(node) if node.value.to_sass.strip == 'none'
    end

    def description
      '`border: 0;` is preferred over `border: none;`'
    end
  end

private

   BORDER_PROPERTIES = %w[border
                          border-top
                          border-right
                          border-bottom
                          border-left]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scss-lint-0.7.1 lib/scss_lint/linter/border_zero_linter.rb
scss-lint-0.7.0 lib/scss_lint/linter/border_zero_linter.rb