Sha256: 4e41826c1778dfdfa1d9f1a98d44fd3cf52e6ff25d0486a0e42461248de545ae

Contents?: true

Size: 1.31 KB

Versions: 20

Compression:

Stored size: 1.31 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::Node}s
    # representing `#{}`-interpolation.
    #
    # @return [Array<String, Sass::Script::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::Node>]
    #   The CSS selector to extend,
    #   interspersed with {Sass::Script::Node}s
    #   representing `#{}`-interpolation.
    # @param optional [Boolean] See \{#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

20 entries across 20 versions & 1 rubygems

Version Path
sass-3.3.0.alpha.149 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.144 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.142 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.141 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.138 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.136 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.134 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.133 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.129 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.128 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.127 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.132 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.121 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.120 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.107 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.103 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.102 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.101 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.93 lib/sass/tree/extend_node.rb
sass-3.3.0.alpha.88 lib/sass/tree/extend_node.rb