Class Sass::Tree::Visitors::Cssize
In: lib/sass/tree/visitors/cssize.rb
Parent: Sass::Tree::Visitors::Base

A visitor for converting a static Sass tree into a static CSS tree.

Methods

Constants

Extend = Struct.new(:extender, :target, :node, :directives)   A simple struct wrapping up information about a single `@extend` instance. A single [ExtendNode] can have multiple Extends if either the parent node or the extended selector is a comma sequence.

@attr extender [Array<Sass::Selector::SimpleSequence, String>]

  The selector of the CSS rule containing the `@extend`.

@attr target [Array<Sass::Selector::Simple>] The selector being `@extend`ed. @attr node [Sass::Tree::ExtendNode] The node that produced this extend. @attr directives [Array<Sass::Tree::DirectiveNode>]

  The directives containing the `@extend`.

Attributes

parent  [R]  Returns the immediate parent of the current node. @return [Tree::Node]

Public Class methods

@param root [Tree::Node] The root node of the tree to visit. @return [(Tree::Node, Sass::Util::SubsetMap)] The resulting tree of static nodes

  *and* the extensions defined for this tree

Protected Instance methods

If an exception is raised, this adds proper metadata to the backtrace.

Keeps track of the current parent node.

Registers an extension in the `@extends` subset map.

Modifies exception backtraces to include the imported file.

Bubbles the `@media` directive up through RuleNodes and merges it with other `@media` directives.

Asserts that all the mixin‘s children are valid in their new location.

Converts nested properties into flat properties and updates the indentation of the prop node based on the nesting level.

In Ruby 1.8, ensures that there‘s only one `@charset` directive and that it‘s at the top of the document.

@return [(Tree::Node, Sass::Util::SubsetMap)] The resulting tree of static nodes

  *and* the extensions defined for this tree

Resolves parent references and nested selectors, and updates the indentation of the rule node based on the nesting level.

Runs a block of code with the current parent node replaced with the given node.

@param parent [Tree::Node] The new parent for the duration of the block. @yield A block in which the parent is set to `parent`. @return [Object] The return value of the block.

[Validate]