Less_Tree_Import
extends Less_Tree
in package
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.
Tags
Table of Contents
- $cache_string : mixed
- $css : mixed
- $currentFileInfo : mixed
- $features : mixed
- $index : mixed
- $options : mixed
- $path : mixed
- $root : mixed
- $skip : mixed
- $type : mixed
- __construct() : mixed
- __set_state() : mixed
- Requires php 5.3+
- accept() : mixed
- compile() : mixed
- compileForImport() : mixed
- compilePath() : mixed
- genCSS() : void
- Generate CSS by adding it to the output object
- getPath() : string
- outputRuleset() : mixed
- ParseImport() : Less_Tree_Media|array<string|int, mixed>
- Parse the import url and return the rules
- PathAndUri() : mixed
- Using the import directories, get the full absolute path and uri of the import
- ReferencedArray() : mixed
- toCSS() : mixed
- Skip() : bool|null
- Should the import be skipped?
Properties
$cache_string
public
mixed
$cache_string
$css
public
mixed
$css
$currentFileInfo
public
mixed
$currentFileInfo
$features
public
mixed
$features
$index
public
mixed
$index
$options
public
mixed
$options
$path
public
mixed
$path
$root
public
mixed
$root
$skip
public
mixed
$skip
$type
public
mixed
$type
= 'Import'
Methods
__construct()
public
__construct(mixed $path, mixed $features, mixed $options, mixed $index[, mixed $currentFileInfo = null ]) : mixed
Parameters
- $path : mixed
- $features : mixed
- $options : mixed
- $index : mixed
- $currentFileInfo : mixed = null
Return values
mixed —__set_state()
Requires php 5.3+
public
static __set_state(mixed $args) : mixed
Parameters
- $args : mixed
Return values
mixed —accept()
public
accept(mixed $visitor) : mixed
Parameters
- $visitor : mixed
Return values
mixed —compile()
public
compile(mixed $env) : mixed
Parameters
- $env : mixed
Return values
mixed —compileForImport()
public
compileForImport(mixed $env) : mixed
Parameters
- $env : mixed
Return values
mixed —compilePath()
public
compilePath(mixed $env) : mixed
Parameters
- $env : mixed
Return values
mixed —genCSS()
Generate CSS by adding it to the output object
public
genCSS(mixed $output) : void
Parameters
- $output : mixed
-
The output
Tags
Return values
void —getPath()
public
getPath() : string
Return values
string —outputRuleset()
public
static outputRuleset(mixed $output, array<string|int, Less_Tree_Ruleset> $rules) : mixed
Parameters
- $output : mixed
- $rules : array<string|int, Less_Tree_Ruleset>
Return values
mixed —ParseImport()
Parse the import url and return the rules
public
ParseImport(mixed $full_path, mixed $uri, mixed $env) : Less_Tree_Media|array<string|int, mixed>
Parameters
- $full_path : mixed
- $uri : mixed
- $env : mixed
Return values
Less_Tree_Media|array<string|int, mixed> —PathAndUri()
Using the import directories, get the full absolute path and uri of the import
public
PathAndUri() : mixed
Return values
mixed —ReferencedArray()
public
static ReferencedArray(mixed $rules) : mixed
Parameters
- $rules : mixed
Return values
mixed —toCSS()
public
toCSS() : mixed
Return values
mixed —Skip()
Should the import be skipped?
private
Skip(mixed $path, mixed $env) : bool|null
Parameters
- $path : mixed
- $env : mixed