\Less_Tree_Import

CSS @import node

The general strategy here is that we don't want to wait for the parsing to be completed, before we start importing the file. That's because in the context of a browser, most of the time will be spent waiting for the server to respond.

On creation, we push the import path to our import queue, though import,push, we also pass it a callback, which it'll call once the file has been fetched, and parsed.

Summary

Methods
Properties
Constants
toCSS()
genCSS()
outputRuleset()
accept()
ReferencedArray()
__set_state()
__construct()
getPath()
compileForImport()
compilePath()
compile()
PathAndUri()
ParseImport()
$cache_string
$options
$index
$path
$features
$currentFileInfo
$css
$skip
$root
$type
No constants found
No protected methods found
No protected properties found
N/A
Skip()
No private properties found
N/A

Properties

$cache_string

$cache_string : 

Type

$options

$options : 

Type

$index

$index : 

Type

$path

$path : 

Type

$features

$features : 

Type

$currentFileInfo

$currentFileInfo : 

Type

$css

$css : 

Type

$skip

$skip : 

Type

$root

$root : 

Type

$type

$type : 

Type

Methods

toCSS()

toCSS() 

genCSS()

genCSS(  $output) : void

Generate CSS by adding it to the output object

Parameters

$output

outputRuleset()

outputRuleset(  $output, array<mixed,\Less_Tree_Ruleset>  $rules) 

Parameters

$output
array<mixed,\Less_Tree_Ruleset> $rules

accept()

accept(  $visitor) 

Parameters

$visitor

ReferencedArray()

ReferencedArray(  $rules) 

Parameters

$rules

__set_state()

__set_state(  $args) 

Requires php 5.3+

Parameters

$args

__construct()

__construct(  $path,   $features,   $options,   $index,   $currentFileInfo = null) 

Parameters

$path
$features
$options
$index
$currentFileInfo

getPath()

getPath() : string

Returns

string

compileForImport()

compileForImport(  $env) 

Parameters

$env

compilePath()

compilePath(  $env) 

Parameters

$env

compile()

compile(  $env) 

Parameters

$env

PathAndUri()

PathAndUri() 

Using the import directories, get the full absolute path and uri of the import

ParseImport()

ParseImport(  $full_path,   $uri,   $env) : \Less_Tree_Media|array

Parse the import url and return the rules

Parameters

$full_path
$uri
$env

Returns

\Less_Tree_Media|array

Skip()

Skip(  $path,   $env) : boolean|null

Should the import be skipped?

Parameters

$path
$env

Returns

boolean|null