class Sass::Tree::WhileNode

@see Sass::Tree
A dynamic node representing a Sass ‘@while` loop.

def _perform(environment)

Other tags:
    See: Sass::Tree -

Returns:
  • (Array) - The resulting static nodes

Parameters:
  • environment (Sass::Environment) -- The lexical environment containing
def _perform(environment)
  children = []
  new_environment = Sass::Environment.new(environment)
  while @expr.perform(environment).to_bool
    children += perform_children(new_environment)
  end
  children
end

def initialize(expr)

Parameters:
  • expr (Script::Node) -- The parse tree for the continue expression
def initialize(expr)
  @expr = expr
  super()
end

def invalid_child?(child)

Returns:
  • (Boolean, String) - Whether or not the child node is valid,

Parameters:
  • child (Tree::Node) -- A potential child node.
def invalid_child?(child)
  super unless child.is_a?(ExtendNode)
end

def to_src(tabs, opts, fmt)

Other tags:
    See: Node#to_src -
def to_src(tabs, opts, fmt)
  "#{'  ' * tabs}@while #{@expr.to_sass(opts)}" + children_to_src(tabs, opts, fmt)
end