Sha256: a311fa4a2c94b51ac53992370f3bd3445bcd5d5240e4fd396a7638d63f5c560d
Contents?: true
Size: 453 Bytes
Versions: 11
Compression:
Stored size: 453 Bytes
Contents
class SCSSBeautifier::Formatters::EmptyRule < Sass::Tree::Visitors::Base def visit_root(node) remove_empty_rule(node) yield remove_empty_rule(node) end def visit_rule(node) remove_empty_rule(node) visit_children(node) remove_empty_rule(node) end def remove_empty_rule(node) filtered = node.children.reject do |c| Sass::Tree::RuleNode === c && c.children.empty? end node.children = filtered end end
Version data entries
11 entries across 11 versions & 1 rubygems