Class: Sass::Tree::Visitors::Extend

Inherits:
Base
  • Object
show all
Defined in:
.ruby-sass/lib/sass/tree/visitors/extend.rb

Overview

A visitor for performing selector inheritance on a static CSS tree.

Destructively modifies the tree.

Class Method Summary (collapse)

Class Method Details

.visit(root, extends) ⇒ Object

Performs the given extensions on the static CSS tree based in `root`, then validates that all extends matched some selector.

The extensions to perform on this tree.

Parameters:

Returns:

  • (Object)

    The return value of #visit for the root node.



13
14
15
16
17
# File '.ruby-sass/lib/sass/tree/visitors/extend.rb', line 13

def self.visit(root, extends)
  return if extends.empty?
  new(extends).send(:visit, root)
  check_extends_fired! extends
end