Sha256: d26d1cb19911c867b88468d8c431f1b099af10ff1d24c4714902f5587ddc9433
Contents?: true
Size: 580 Bytes
Versions: 8
Compression:
Stored size: 580 Bytes
Contents
class SCSSBeautifier::Formatters::BorderZero < SCSSBeautifier::Formatters::Base BORDER_PROPERTIES = %w[ border border-top border-right border-bottom border-left ].freeze def visit_prop(node) return unless BORDER_PROPERTIES.include?(node.name.first.to_s) # return unless node.value.length == 1 format_border(node.value) end def format_border(node) return unless Sass::Script::Tree::Literal === node return unless node.value.value == "0" node.instance_variable_set(:@value, Sass::Script::Value::String.new("none")) end end
Version data entries
8 entries across 8 versions & 1 rubygems