# File lib/sass/tree/visitors/cssize.rb, line 168 def visit_atroot(node) # If there aren't any more directives or rules that this @at-root needs to # exclude, we can get rid of it and just evaluate the children. if @parents.none? {|n| node.exclude_node?(n)} results = visit_children_without_parent(node) results.each {|c| c.tabs += node.tabs if bubblable?(c)} if !results.empty? && bubblable?(results.last) results.last.group_end = node.group_end end return results end # If this @at-root excludes the immediate parent, return it as-is so that it # can be bubbled up by the parent node. return Bubble.new(node) if node.exclude_node?(parent) # Otherwise, duplicate the current parent and move it into the @at-root # node. As above, returning an @at-root node signals to the parent directive # that it should be bubbled upwards. bubble(node) end