### Home Classes Methods

### In Files

- lib/sass/tree/at_root_node.rb

### Parent

Sass::Tree::Node

### Methods

- ::new
- #bubbles?
- #exclude?
- #exclude_node?

### 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::AtRootNode

A dynamic node representing an `@at-root` directive.

An `@at-root` directive with a selector is converted to an {AtRootNode} containing a {RuleNode} at parse time.

@see Sass::Tree

### Attributes

group_end[RW]

Whether the last child of this node should be considered the end of a group.

@return [Boolean]

query[RW]

The query for this node (e.g. `(without: media)`), interspersed with {Sass::Script::Tree::Node}s representing `#{}`-interpolation. Any adjacent strings will be merged together.

This will be nil if the directive didn’t have a query. In this case, {resolved_type} will automatically be set to `:without` and {resolved_rule} will automatically be set to `[“rule”]`.

@return [Array<String, Sass::Script::Tree::Node>]

resolved_type[RW]

The resolved type of this directive. `:with` or `:without`.

@return [Symbol]

resolved_value[RW]

The resolved value of this directive – a list of directives to either include or exclude.

@return [Array<String>]

tabs[RW]

The number of additional tabs that the contents of this node should be indented.

@return [Number]

### Public Class Methods

new(query = nil) click to toggle source

    # File lib/sass/tree/at_root_node.rb, line 45
    def initialize(query = nil)
      super()
      @query = Sass::Util.strip_string_array(Sass::Util.merge_adjacent_strings(query)) if query
      @tabs = 0
    end

### Public Instance Methods

bubbles?() click to toggle source

@see Node#bubbles?

    # File lib/sass/tree/at_root_node.rb, line 78
    def bubbles?
      true
    end

exclude?(directive) click to toggle source

Returns whether or not the given directive is excluded by this node. `directive` may be “rule”, which indicates whether normal CSS rules should be excluded.

@param directive [String] @return [Boolean]

    # File lib/sass/tree/at_root_node.rb, line 57
    def exclude?(directive)
      if resolved_type == :with
        return false if resolved_value.include?('all')
        !resolved_value.include?(directive)
      else # resolved_type == :without
        return true if resolved_value.include?('all')
        resolved_value.include?(directive)
      end
    end

exclude_node?(node) click to toggle source

Returns whether the given node is excluded by this node.

@param node [Sass::Tree::Node] @return [Boolean]

    # File lib/sass/tree/at_root_node.rb, line 71
    def exclude_node?(node)
      return exclude?(node.name.gsub(/^@/, '')) if node.is_a?(Sass::Tree::DirectiveNode)
      return exclude?('keyframes') if node.is_a?(Sass::Tree::KeyframeRuleNode)
      exclude?('rule') && node.is_a?(Sass::Tree::RuleNode)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.