Sha256: 7b4761040f5485bb6e5cdc2b181d58ace6596f659c29d4490326a356cbae73b9

Contents?: true

Size: 453 Bytes

Versions: 6

Compression:

Stored size: 453 Bytes

Contents

class SCSSBeautifier::Formatters::LeadingZero < SCSSBeautifier::Formatters::Base
  # ExcludeZero Only
  def visit_prop(node)
    if Sass::Script::Tree::Literal === node.value && Sass::Script::Value::String === node.value.value
      node_value = node.value.value
      if node.value.value.to_s.match(/\b0\./)
        node.instance_variable_set(:@value, Sass::Script::Value::String.new(node.value.value.to_s.gsub(/\b0/, '')))
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scss_beautifier-0.1.17 lib/scss_beautifier/formatters/leading_zero.rb
scss_beautifier-0.1.16 lib/scss_beautifier/formatters/leading_zero.rb
scss_beautifier-0.1.15 lib/scss_beautifier/formatters/leading_zero.rb
scss_beautifier-0.1.14 lib/scss_beautifier/formatters/leading_zero.rb
scss_beautifier-0.1.13 lib/scss_beautifier/formatters/leading_zero.rb
scss_beautifier-0.1.12 lib/scss_beautifier/formatters/leading_zero.rb