Sha256: 89dd4773654fac8a760f35fb52679b518a4ac1e415f407555cd8d8cd4597e21d

Contents?: true

Size: 1.34 KB

Versions: 53

Compression:

Stored size: 1.34 KB

Contents

require 'sass/tree/node'

module Sass::Tree
  # A static node reprenting an `@extend` directive.
  #
  # @see Sass::Tree
  class ExtendNode < Node
    # The parsed selector after interpolation has been resolved.
    # Only set once {Tree::Visitors::Perform} has been run.
    #
    # @return [Selector::CommaSequence]
    attr_accessor :resolved_selector

    # The CSS selector to extend, interspersed with {Sass::Script::Tree::Node}s
    # representing `#{}`-interpolation.
    #
    # @return [Array<String, Sass::Script::Tree::Node>]
    attr_accessor :selector

    # The extended selector source range.
    #
    # @return [Sass::Source::Range]
    attr_accessor :selector_source_range

    # Whether the `@extend` is allowed to match no selectors or not.
    #
    # @return [Boolean]
    def optional?; @optional; end

    # @param selector [Array<String, Sass::Script::Tree::Node>]
    #   The CSS selector to extend,
    #   interspersed with {Sass::Script::Tree::Node}s
    #   representing `#{}`-interpolation.
    # @param optional [Boolean] See \{ExtendNode#optional?}
    # @param selector_source_range [Sass::Source::Range] The extended selector source range.
    def initialize(selector, optional, selector_source_range)
      @selector = selector
      @optional = optional
      @selector_source_range = selector_source_range
      super()
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
sass-3.3.3 lib/sass/tree/extend_node.rb
sass-3.3.2 lib/sass/tree/extend_node.rb
sass-3.3.1 lib/sass/tree/extend_node.rb
sass-3.3.0 lib/sass/tree/extend_node.rb
sass-3.3.0.rc.6 lib/sass/tree/extend_node.rb
sass-3.3.0.rc.5 lib/sass/tree/extend_node.rb
sass-3.3.0.rc.4 lib/sass/tree/extend_node.rb
sass-3.3.0.rc.3 lib/sass/tree/extend_node.rb
sass-3.3.0.rc.2 lib/sass/tree/extend_node.rb
sass-3.3.0.rc.1 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.392 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.391 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.390 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.389 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.388 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.382 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.380 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.378 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.377 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.376 lib/sass/tree/extend_node.rb