Sha256: 9a09c1bf94dbc3621ed1e5495f0afcf6af5d3c0534fdade69b8e12d8a411e0fa
Contents?: true
Size: 459 Bytes
Versions: 8
Compression:
Stored size: 459 Bytes
Contents
class SCSSBeautifier::Formatters::EmptyRule < SCSSBeautifier::Formatters::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
8 entries across 8 versions & 1 rubygems