### Home Classes Methods

### In Files

- lib/sass/tree/node.rb
- lib/sass/tree/trace_node.rb
- lib/sass/tree/charset_node.rb
- lib/sass/tree/directive_node.rb
- lib/sass/tree/if_node.rb
- lib/sass/tree/function_node.rb
- lib/sass/tree/return_node.rb
- lib/sass/tree/supports_node.rb
- lib/sass/tree/prop_node.rb
- lib/sass/tree/each_node.rb
- lib/sass/tree/rule_node.rb
- lib/sass/tree/mixin_node.rb
- lib/sass/tree/while_node.rb
- lib/sass/tree/extend_node.rb
- lib/sass/tree/for_node.rb
- lib/sass/tree/content_node.rb
- lib/sass/tree/variable_node.rb
- lib/sass/tree/debug_node.rb
- lib/sass/tree/import_node.rb
- lib/sass/tree/css_import_node.rb
- lib/sass/tree/root_node.rb
- lib/sass/tree/warn_node.rb
- lib/sass/tree/media_node.rb
- lib/sass/tree/mixin_def_node.rb
- lib/sass/tree/comment_node.rb

### Namespace

- MODULE Sass::Tree::Visitors
- CLASS Sass::Tree::CharsetNode
- CLASS Sass::Tree::CommentNode
- CLASS Sass::Tree::ContentNode
- CLASS Sass::Tree::CssImportNode
- CLASS Sass::Tree::DebugNode
- CLASS Sass::Tree::DirectiveNode
- CLASS Sass::Tree::EachNode
- CLASS Sass::Tree::ExtendNode
- CLASS Sass::Tree::ForNode
- CLASS Sass::Tree::FunctionNode
- CLASS Sass::Tree::IfNode
- CLASS Sass::Tree::ImportNode
- CLASS Sass::Tree::MediaNode
- CLASS Sass::Tree::MixinDefNode
- CLASS Sass::Tree::MixinNode
- CLASS Sass::Tree::Node
- CLASS Sass::Tree::PropNode
- CLASS Sass::Tree::ReturnNode
- CLASS Sass::Tree::RootNode
- CLASS Sass::Tree::RuleNode
- CLASS Sass::Tree::SupportsNode
- CLASS Sass::Tree::TraceNode
- CLASS Sass::Tree::VariableNode
- CLASS Sass::Tree::WarnNode
- CLASS Sass::Tree::WhileNode

### Class/Module Index

Quicksearch

- Sass
- Sass::CSS
- Sass::CacheStores
- Sass::CacheStores::Base
- Sass::CacheStores::Chain
- Sass::CacheStores::Filesystem
- Sass::CacheStores::Memory
- Sass::CacheStores::Null
- Sass::Callbacks
- Sass::Callbacks::InstanceMethods
- Sass::Engine
- Sass::Engine::Line
- Sass::Environment
- Sass::Exec
- Sass::Exec::Generic
- Sass::Exec::Sass
- Sass::Exec::SassConvert
- Sass::Exec::Scss
- Sass::Importers
- Sass::Importers::Base
- Sass::Importers::Filesystem
- Sass::Logger
- Sass::Logger::Base
- Sass::Logger::LogLevel
- Sass::Logger::LogLevel::ClassMethods
- Sass::Media
- Sass::Media::Query
- Sass::Media::QueryList
- Sass::Plugin
- Sass::Plugin::Compiler
- Sass::Plugin::Configuration
- Sass::Plugin::MerbBootLoader
- Sass::Plugin::Rack
- Sass::Plugin::StalenessChecker
- Sass::Repl
- Sass::SCSS
- Sass::SCSS::CssParser
- Sass::SCSS::Parser
- Sass::SCSS::RX
- Sass::SCSS::ScriptLexer
- Sass::SCSS::ScriptParser
- Sass::SCSS::StaticParser
- Sass::Script
- Sass::Script::ArgList
- Sass::Script::Bool
- Sass::Script::Color
- Sass::Script::CssLexer
- Sass::Script::CssParser
- Sass::Script::Funcall
- Sass::Script::Functions
- Sass::Script::Functions::EvaluationContext
- Sass::Script::Interpolation
- Sass::Script::Lexer
- Sass::Script::List
- Sass::Script::Literal
- Sass::Script::Node
- Sass::Script::Null
- Sass::Script::Number
- Sass::Script::Operation
- Sass::Script::Parser
- Sass::Script::String
- Sass::Script::StringInterpolation
- Sass::Script::UnaryOperation
- Sass::Script::Variable
- Sass::Selector
- Sass::Selector::AbstractSequence
- Sass::Selector::Attribute
- Sass::Selector::Class
- Sass::Selector::CommaSequence
- Sass::Selector::Element
- Sass::Selector::Id
- Sass::Selector::Interpolation
- Sass::Selector::Parent
- Sass::Selector::Placeholder
- Sass::Selector::Pseudo
- Sass::Selector::SelectorPseudoClass
- Sass::Selector::Sequence
- Sass::Selector::Simple
- Sass::Selector::SimpleSequence
- Sass::Selector::Universal
- Sass::Shared
- Sass::Supports
- Sass::Supports::Condition
- Sass::Supports::Declaration
- Sass::Supports::Interpolation
- Sass::Supports::Negation
- Sass::Supports::Operator
- Sass::SyntaxError
- Sass::Tree
- Sass::Tree::CharsetNode
- Sass::Tree::CommentNode
- Sass::Tree::ContentNode
- Sass::Tree::CssImportNode
- Sass::Tree::DebugNode
- Sass::Tree::DirectiveNode
- Sass::Tree::EachNode
- Sass::Tree::ExtendNode
- Sass::Tree::ForNode
- Sass::Tree::FunctionNode
- Sass::Tree::IfNode
- Sass::Tree::ImportNode
- Sass::Tree::MediaNode
- Sass::Tree::MixinDefNode
- Sass::Tree::MixinNode
- Sass::Tree::Node
- Sass::Tree::PropNode
- Sass::Tree::ReturnNode
- Sass::Tree::RootNode
- Sass::Tree::RuleNode
- Sass::Tree::SupportsNode
- Sass::Tree::TraceNode
- Sass::Tree::VariableNode
- Sass::Tree::Visitors
- Sass::Tree::Visitors::Base
- Sass::Tree::Visitors::CheckNesting
- Sass::Tree::Visitors::Convert
- Sass::Tree::Visitors::Cssize
- Sass::Tree::Visitors::DeepCopy
- Sass::Tree::Visitors::Extend
- Sass::Tree::Visitors::Perform
- Sass::Tree::Visitors::SetOptions
- Sass::Tree::Visitors::ToCss
- Sass::Tree::WarnNode
- Sass::Tree::WhileNode
- Sass::UnitConversionError
- Sass::Util
- Sass::Util::MultibyteStringScanner
- Sass::Util::StaticConditionalContext
- Sass::Util::SubsetMap
- Sass::Util::Test
- Sass::Version
- ActionController
- ActionController::Base
- Object

No matching classes.

# Sass::Tree

A namespace for nodes in the Sass parse tree.

The Sass parse tree has three states: dynamic, static Sass, and static CSS.

When it's first parsed, a Sass document is in the dynamic state. It has nodes for mixin definitions and `@for` loops and so forth, in addition to nodes for CSS rules and properties. Nodes that only appear in this state are called **dynamic nodes**.

{Tree::Visitors::Perform} creates a static Sass tree, which is different. It still has nodes for CSS rules and properties but it doesn't have any dynamic-generation-related nodes. The nodes in this state are in the same structure as the Sass document: rules and properties are nested beneath one another. Nodes that can be in this state or in the dynamic state are called **static nodes**; nodes that can only be in this state are called **solely static nodes**.

{Tree::Visitors::Cssize} is then used to create a static CSS tree. This is like a static Sass tree, but the structure exactly mirrors that of the generated CSS. Rules and properties can't be nested beneath one another in this state.

Finally, {Tree::Visitors::ToCss} can be called on a static CSS tree to get the actual CSS code as a string.

[Validate]

Generated with the Darkfish Rdoc Generator 2.