class Sass::Tree::ImportNode

to the backtrace if an error occurs.
It doesn’t have a functional purpose other than to add the ‘@import`ed file
A static node that wraps the {Sass::Tree} for an `@import`ed file.

def import

def import
  begin
    full_filename = Sass::Files.find_file_to_import(@imported_filename, import_paths)
  rescue Exception => e
    raise SyntaxError.new(e.message, self.line)
  end
  if full_filename =~ /\.css$/
    @to_s = "@import url(#{full_filename});"
    return false
  end
  return full_filename
end

def import_paths

def import_paths
  paths = (@options[:load_paths] || []).dup
  paths.unshift(File.dirname(@options[:filename])) if @options[:filename]
  paths
end

def initialize(imported_filename)

Parameters:
  • imported_filename (String) -- The name of the imported file
def initialize(imported_filename)
  @imported_filename = imported_filename
  super()
end

def invisible?; to_s.empty?; end

def invisible?; to_s.empty?; end

def perform!(environment)

Parameters:
  • environment (Sass::Environment) -- The lexical environment containing
def perform!(environment)
  return unless full_filename = import
  self.children = Sass::Files.tree_for(full_filename, @options).children
  self.children = perform_children(environment)
rescue Sass::SyntaxError => e
  e.add_backtrace_entry(@filename)
  raise e
end

def to_s(*args)

Parameters:
  • args (Array) -- Ignored
def to_s(*args)
  @to_s ||= (style == :compressed ? super().strip : super())
rescue Sass::SyntaxError => e
  e.add_backtrace_entry(@filename)
  raise e
end