Sha256: 5bf853adf6831b545514fdc7cb17798eb5df75b22798f8823009fc165cbcc861
Contents?: true
Size: 574 Bytes
Versions: 11
Compression:
Stored size: 574 Bytes
Contents
class SCSSBeautifier::Formatters::BorderZero < Sass::Tree::Visitors::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
11 entries across 11 versions & 1 rubygems