### Home Classes Methods

### In Files

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

### Namespace

- MODULE Sass::Tree::Visitors
- CLASS Sass::Tree::AtRootNode
- 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::ErrorNode
- CLASS Sass::Tree::ExtendNode
- CLASS Sass::Tree::ForNode
- CLASS Sass::Tree::FunctionNode
- CLASS Sass::Tree::IfNode
- CLASS Sass::Tree::ImportNode
- CLASS Sass::Tree::KeyframeRuleNode
- 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::BaseEnvironment
- 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::Base
- Sass::Exec::SassConvert
- Sass::Exec::SassScss
- Sass::Exec::SassScss::Sass::Plugin.compiler
- Sass::Features
- 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::ReadOnlyEnvironment
- 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::CssLexer
- Sass::Script::CssParser
- Sass::Script::Functions
- Sass::Script::Functions::EvaluationContext
- Sass::Script::Lexer
- Sass::Script::Parser
- Sass::Script::Tree
- Sass::Script::Tree::Funcall
- Sass::Script::Tree::Interpolation
- Sass::Script::Tree::ListLiteral
- Sass::Script::Tree::Literal
- Sass::Script::Tree::MapLiteral
- Sass::Script::Tree::Node
- Sass::Script::Tree::Operation
- Sass::Script::Tree::Selector
- Sass::Script::Tree::StringInterpolation
- Sass::Script::Tree::UnaryOperation
- Sass::Script::Tree::Variable
- Sass::Script::Value
- Sass::Script::Value::ArgList
- Sass::Script::Value::Base
- Sass::Script::Value::Bool
- Sass::Script::Value::Color
- Sass::Script::Value::Helpers
- Sass::Script::Value::List
- Sass::Script::Value::Map
- Sass::Script::Value::Null
- Sass::Script::Value::Number
- Sass::Script::Value::String
- Sass::Selector
- Sass::Selector::AbstractSequence
- Sass::Selector::Attribute
- Sass::Selector::Class
- Sass::Selector::CommaSequence
- Sass::Selector::Element
- Sass::Selector::Id
- Sass::Selector::Parent
- Sass::Selector::Placeholder
- Sass::Selector::Pseudo
- Sass::Selector::Sequence
- Sass::Selector::Simple
- Sass::Selector::SimpleSequence
- Sass::Selector::Universal
- Sass::SemiGlobalEnvironment
- Sass::Shared
- Sass::Source
- Sass::Source::Map
- Sass::Source::Map::Mapping
- Sass::Source::Position
- Sass::Source::Range
- Sass::Stack
- Sass::Stack::Frame
- Sass::Supports
- Sass::Supports::Condition
- Sass::Supports::Declaration
- Sass::Supports::Interpolation
- Sass::Supports::Negation
- Sass::Supports::Operator
- Sass::SyntaxError
- Sass::Tree
- Sass::Tree::AtRootNode
- Sass::Tree::CharsetNode
- Sass::Tree::CommentNode
- Sass::Tree::ContentNode
- Sass::Tree::CssImportNode
- Sass::Tree::DebugNode
- Sass::Tree::DirectiveNode
- Sass::Tree::EachNode
- Sass::Tree::ErrorNode
- Sass::Tree::ExtendNode
- Sass::Tree::ForNode
- Sass::Tree::FunctionNode
- Sass::Tree::IfNode
- Sass::Tree::ImportNode
- Sass::Tree::KeyframeRuleNode
- 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::Cssize::Bubble
- 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::CrossPlatformRandom
- Sass::Util::MultibyteStringScanner
- Sass::Util::NormalizedMap
- Sass::Util::StaticConditionalContext
- Sass::Util::SubsetMap
- Sass::Util::Test
- Sass::Version
- ActionController
- ActionController::Base
- Object
- OrderedHash

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 a similar structure to the Sass document: rules and properties are nested beneath one another, although the {Tree::RuleNode} selectors are already in their final state. 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.