# class Sass::Tree::CssImportNode

A node representing an `@import` rule that's importing plain CSS.

@see Sass::Tree

### Attributes

query[RW]

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

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

resolved_query[RW]

The media query for this rule, without any unresolved interpolation. It's only set once {Tree::Visitors::Perform} has been run.

@return [Sass::Media::QueryList]

resolved_uri[RW]

The text of the URI being imported after any interpolated SassScript has been resolved. Only set once {Tree::Visitors::Perform} has been run.

@return [String]

supports_condition[RW]

The supports condition for this import.

@return [Sass::Supports::Condition]

uri[RW]

The URI being imported, either as a plain string or an interpolated script string.

@return [String, Sass::Script::Tree::Node]

### Public Class Methods

new(uri, query = [], supports_condition = nil) click to toggle source

@param uri [String, Sass::Script::Tree::Node] See {#uri} @param query [Array<String, Sass::Script::Tree::Node>] See {#query} @param #supports_condition [Sass::Supports::Condition] See {#supports_condition}

Calls superclass method

    # File lib/sass/tree/css_import_node.rb, line 39
    def initialize(uri, query = [], supports_condition = nil)
      @uri = uri
      @query = query
      @supports_condition = supports_condition
      super('')
    end

resolved(uri) click to toggle source

@param uri [String] See {#resolved_uri} @return [CssImportNode]

    # File lib/sass/tree/css_import_node.rb, line 48
    def self.resolved(uri)
      node = new(uri)
      node.resolved_uri = uri
      node
    end

### Public Instance Methods

resolved_value() click to toggle source

@see Sass::Tree::DirectiveNode#resolved_value

    # File lib/sass/tree/css_import_node.rb, line 58
    def resolved_value
      @resolved_value ||=
        begin
          str = "@import #{resolved_uri}"
          str << " supports(#{supports_condition.to_css})" if supports_condition
          str << " #{resolved_query.to_css}" if resolved_query
          str
        end
    end

value() click to toggle source

@see Sass::Tree::DirectiveNode#value

    # File lib/sass/tree/css_import_node.rb, line 55
    def value; raise NotImplementedError; end