Module Less::StyleSheet::Import1
In: lib/sass/less.rb
SassNode Engine Keyword FontFamily Anonymous Number Color Function Expression Variable Quoted Property Element Def Call lib/sass/less.rb lib/sass/less.rb lib/sass/less.rb Mixin Entity Node Selectors2 Import1 Accessor1 Declaration3 Alpha1 Entity Mixin4 StyleSheet Less dot/m_7_0.png

@import statements. Less handles these during parse-time, so we want to wrap them up as a node in the tree. We also include the nodes, though, since we want to have access to the mixins so we can tell if they take arguments or not. The included nodes are hidden so they don‘t appear in the output.

Methods

External Aliases

build -> build_without_sass

Public Instance methods

build(env)

Alias for build_with_sass

[Source]

     # File lib/sass/less.rb, line 107
107:       def build_with_sass(env)
108:         line = input.line_of(interval.first)
109:         import = Sass::Tree::ImportNode.new(url.value.gsub(/\.less$/, ''))
110:         import.line = input.line_of(interval.first)
111:         env << Node::SassNode.new(import)
112:         old_rules = env.rules.dup
113:         build_without_sass env
114:         (env.rules - old_rules).each {|r| r.hide_in_sass = true}
115:       rescue ImportError => e
116:         raise Sass::SyntaxError.new("File to import #{url.text_value} not found or unreadable", :line => line)
117:       end

[Validate]