Module: Sass::Tree
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/at_root_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/charset_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/comment_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/content_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/css_import_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/debug_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/directive_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/each_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/error_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/extend_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/for_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/function_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/if_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/import_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/keyframe_rule_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/media_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/mixin_def_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/mixin_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/prop_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/return_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/root_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/rule_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/supports_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/trace_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/variable_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/warn_node.rb,
/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/while_node.rb
Overview
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.
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 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.
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, Visitors::ToCss can be called on a static CSS tree to get the actual CSS code as a string.
Defined Under Namespace
Modules: Visitors Classes: AtRootNode, CharsetNode, CommentNode, ContentNode, CssImportNode, DebugNode, DirectiveNode, EachNode, ErrorNode, ExtendNode, ForNode, FunctionNode, IfNode, ImportNode, KeyframeRuleNode, MediaNode, MixinDefNode, MixinNode, Node, PropNode, ReturnNode, RootNode, RuleNode, SupportsNode, TraceNode, VariableNode, WarnNode, WhileNode