MediaWiki
1.23.2
|
lessphp v0.4.0@2cc77e3c7b http://leafo.net/lessphp More...
Public Member Functions | |
__construct ($fname=null) | |
Initialize any static state, can initialize parser for a file $opts isn't used yet. More... | |
addImportDir ($dir) | |
addParsedFile ($file) | |
allParsedFiles () | |
assertArgs ($value, $expectedArgs, $name="") | |
assertColor ($value, $error="expected color value") | |
assertNumber ($value, $error="expecting number") | |
cachedCompile ($in, $force=false) | |
Execute lessphp on a .less file or a lessphp cache structure. More... | |
checkedCompile ($in, $out) | |
colorArgs ($args) | |
Helper function to get arguments for color manipulation functions. More... | |
compile ($string, $name=null) | |
compileFile ($fname, $outFname=null) | |
compileValue ($value) | |
Compiles a primitive value into a CSS property value. More... | |
lib_blue ($color) | |
lib_green ($color) | |
lib_red ($color) | |
parse ($str=null, $initialVariables=null) | |
registerFunction ($name, $func) | |
setFormatter ($name) | |
setImportDir ($dirs) | |
setPreserveComments ($preserve) | |
setVariables ($variables) | |
throwError ($msg=null) | |
Uses the current value of $this->count to show line and line number. More... | |
toBool ($a) | |
unregisterFunction ($name) | |
unsetVariable ($name) | |
Static Public Member Functions | |
static | ccompile ($in, $out, $less=null) |
static | cexecute ($in, $force=false, $less=null) |
static | compressList ($items, $delim) |
static | preg_quote ($what) |
Public Attributes | |
$importDir = '' | |
$importDisabled = false | |
$mPrefix = '$' | |
$parentSelector = '&' | |
$vPrefix = '@' | |
Static Public Attributes | |
static | $FALSE = array("keyword", "false") |
static | $TRUE = array("keyword", "true") |
static | $VERSION = "v0.4.0" |
Protected Member Functions | |
clamp ($v, $max=1, $min=0) | |
coerceColor ($value) | |
coerceString ($value) | |
compileBlock ($block) | |
Recursively compiles a block. More... | |
compileCSSBlock ($block) | |
compileImportedProps ($props, $block, $out, $sourceParser, $importDir) | |
compileMedia ($media) | |
compileMediaQuery ($queries) | |
compileNestedBlock ($block, $selectors) | |
compileProp ($prop, $block, $out) | |
compileProps ($block, $out) | |
compileRoot ($root) | |
compileSelectors ($selectors) | |
deduplicate ($lines) | |
Deduplicate lines in a block. More... | |
eq ($left, $right) | |
evaluate ($exp) | |
expandParentSelectors (&$tag, $replace) | |
fileExists ($name) | |
findBlocks ($searchIn, $path, $orderedArgs, $keywordArgs, $seen=array()) | |
findClosestSelectors () | |
findImport ($url) | |
fixColor ($c) | |
flattenList ($value) | |
funcToColor ($func) | |
Convert the rgb, rgba, hsl color literals of function type as returned by the parser into values of color type. More... | |
get ($name) | |
injectVariables ($args) | |
lib__sprintf ($args) | |
lib_acos ($num) | |
lib_alpha ($value) | |
lib_argb ($color) | |
lib_asin ($num) | |
lib_atan ($num) | |
lib_ceil ($arg) | |
lib_contrast ($args) | |
lib_cos ($num) | |
lib_darken ($args) | |
lib_data_uri ($value) | |
Given an url, decide whether to output a regular link or the base64-encoded contents of the file. More... | |
lib_desaturate ($args) | |
lib_e ($arg) | |
lib_extract ($value) | |
lib_fade ($args) | |
lib_fadein ($args) | |
lib_fadeout ($args) | |
lib_floor ($arg) | |
lib_hue ($color) | |
lib_iscolor ($value) | |
lib_isem ($value) | |
lib_iskeyword ($value) | |
lib_isnumber ($value) | |
lib_ispercentage ($value) | |
lib_ispixel ($value) | |
lib_isrem ($value) | |
lib_isstring ($value) | |
lib_lighten ($args) | |
lib_lightness ($color) | |
lib_luma ($color) | |
lib_mix ($args) | |
lib_mod ($args) | |
lib_percentage ($arg) | |
lib_pi () | |
lib_pow ($args) | |
lib_rgbahex ($color) | |
lib_round ($arg) | |
lib_saturate ($args) | |
lib_saturation ($color) | |
lib_sin ($num) | |
lib_spin ($args) | |
lib_sqrt ($num) | |
lib_tan ($num) | |
lib_unit ($arg) | |
makeOutputBlock ($type, $selectors=null) | |
makeParser ($name) | |
mediaParent ($scope) | |
multiplyMedia ($env, $childQueries=null) | |
multiplySelectors ($selectors) | |
newFormatter () | |
op_color_color ($op, $left, $right) | |
op_color_number ($op, $lft, $rgt) | |
op_number_color ($op, $lft, $rgt) | |
op_number_number ($op, $left, $right) | |
patternMatch ($block, $orderedArgs, $keywordArgs) | |
patternMatchAll ($blocks, $orderedArgs, $keywordArgs, $skip=array()) | |
popEnv () | |
pushEnv ($block=null) | |
reduce ($value, $forExpression=false) | |
set ($name, $value) | |
sortProps ($props, $split=false) | |
stringConcatenate ($left, $right) | |
toHSL ($color) | |
toRGB ($color) | |
Converts a hsl array into a color value in rgb. More... | |
toRGB_helper ($comp, $temp1, $temp2) | |
tryImport ($importPath, $parentBlock, $out) | |
zipSetArgs ($args, $orderedValues, $keywordValues) | |
Protected Attributes | |
$allParsedFiles = array() | |
$libFunctions = array() | |
$numberPrecision = null | |
$preserveComments = false | |
$registeredVars = array() | |
$sourceLoc = null | |
$sourceParser = null | |
Static Protected Attributes | |
static | $cssColors |
static | $nextImportId = 0 |
lessphp v0.4.0@2cc77e3c7b http://leafo.net/lessphp
LESS CSS compiler, adapted from http://lesscss.org
For ease of distribution, lessphp 0.4.0 is under a dual license. You are free to pick which one suits your needs.
MIT LICENSE
Copyright 2013, Leaf Corcoran leafo t@gm ail.c om
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
GPL VERSION 3
Please refer to http://www.gnu.org/licenses/gpl-3.0.html for the full text of the GPL version 3 The LESS compiler and parser.
Converting LESS to CSS is a three stage process. The incoming file is parsed by lessc_parser
into a syntax tree, then it is compiled into another tree representing the CSS structure by lessc
. The CSS tree is fed into a formatter, like lessc_formatter
which then outputs CSS as a string.
During the first compile, all values are reduced, which means that their types are brought to the lowest form before being dump as strings. This handles math equations, variable dereferences, and the like.
The parse
function of lessc
is the entry point.
In summary:
The lessc
class creates an instance of the parser, feeds it LESS code, then transforms the resulting tree to a CSS tree. This class also holds the evaluation context, such as all available mixins and variables at any given time.
The lessc_parser
class is only concerned with parsing its input.
The lessc_formatter
takes a CSS tree, and dumps it to a formatted string, handling things like indentation.
Definition at line 68 of file lessc.inc.php.
lessc::__construct | ( | $fname = null | ) |
Initialize any static state, can initialize parser for a file $opts isn't used yet.
Definition at line 1903 of file lessc.inc.php.
References $fname.
lessc::addImportDir | ( | $dir | ) |
Definition at line 2107 of file lessc.inc.php.
lessc::addParsedFile | ( | $file | ) |
Definition at line 2116 of file lessc.inc.php.
References $file, and allParsedFiles().
Referenced by compileFile(), and tryImport().
lessc::allParsedFiles | ( | ) |
Definition at line 2112 of file lessc.inc.php.
References $allParsedFiles.
Referenced by addParsedFile(), cachedCompile(), and tryImport().
lessc::assertArgs | ( | $value, | |
$expectedArgs, | |||
$name = "" |
|||
) |
Definition at line 1319 of file lessc.inc.php.
References $name, $value, and throwError().
Referenced by lib_extract(), lib_mod(), and lib_pow().
lessc::assertColor | ( | $value, | |
$error = "expected color value" |
|||
) |
Definition at line 1308 of file lessc.inc.php.
References $error, $value, coerceColor(), and throwError().
Referenced by colorArgs(), lib_contrast(), lib_hue(), lib_lightness(), lib_mix(), and lib_saturation().
lessc::assertNumber | ( | $value, | |
$error = "expecting number" |
|||
) |
Definition at line 1314 of file lessc.inc.php.
References $error, $value, and throwError().
Referenced by lib_acos(), lib_asin(), lib_atan(), lib_ceil(), lib_contrast(), lib_cos(), lib_extract(), lib_floor(), lib_mod(), lib_percentage(), lib_pow(), lib_round(), lib_sin(), lib_sqrt(), lib_tan(), and lib_unit().
lessc::cachedCompile | ( | $in, | |
$force = false |
|||
) |
Execute lessphp on a .less file or a lessphp cache structure.
The lessphp cache structure contains information about a specific less file having been parsed. It can be used as a hint for future calls to determine whether or not a rebuild is required.
The cache structure contains two important keys that may be used externally:
compiled: The final compiled CSS updated: The time (in seconds) the CSS was last compiled
The cache structure is a plain-ol' PHP associative array and can be serialized and unserialized without a hitch.
mixed | $in | Input |
bool | $force | Force rebuild? |
Definition at line 1990 of file lessc.inc.php.
References $fname, $in, $out, allParsedFiles(), array(), as, and compileFile().
|
static |
Definition at line 2132 of file lessc.inc.php.
|
static |
Definition at line 2139 of file lessc.inc.php.
References $in.
lessc::checkedCompile | ( | $in, | |
$out | |||
) |
Definition at line 1962 of file lessc.inc.php.
References $in, $out, and compileFile().
|
protected |
Definition at line 1415 of file lessc.inc.php.
Referenced by funcToColor(), lib_darken(), lib_desaturate(), lib_fade(), lib_fadein(), lib_fadeout(), lib_lighten(), and lib_saturate().
|
protected |
Definition at line 1590 of file lessc.inc.php.
References $name, $t, $value, and array().
Referenced by assertColor(), compileValue(), evaluate(), lib__sprintf(), lib_alpha(), lib_blue(), lib_contrast(), lib_green(), lib_iscolor(), lib_luma(), lib_red(), lib_rgbahex(), and reduce().
|
protected |
Definition at line 1622 of file lessc.inc.php.
References $value, and array().
Referenced by stringConcatenate(), and tryImport().
lessc::colorArgs | ( | $args | ) |
Helper function to get arguments for color manipulation functions.
takes a list that contains a color like thing and a percentage
Definition at line 1129 of file lessc.inc.php.
References $args, array(), assertColor(), and list.
Referenced by lib_darken(), lib_desaturate(), lib_fade(), lib_fadein(), lib_fadeout(), lib_lighten(), lib_saturate(), and lib_spin().
lessc::compile | ( | $string, | |
$name = null |
|||
) |
Definition at line 1910 of file lessc.inc.php.
References $name, $out, $parser, compileBlock(), injectVariables(), makeParser(), and newFormatter().
Referenced by compileFile(), and parse().
|
protected |
Recursively compiles a block.
A block is analogous to a CSS block in most cases. A single LESS document is encapsulated in a block when parsed, but it does not have parent tags so all of it's children appear on the root level when compiled.
Blocks are made up of props and children.
Props are property instructions, array tuples which describe an action to be taken, eg. write a property, set a variable, mixin a block.
The children of a block are just all the blocks that are defined within. This is used to look up mixins when performing a mixin.
Compiling the block involves pushing a fresh environment on the stack, and iterating through the props, compiling each one.
Definition at line 217 of file lessc.inc.php.
References $name, array(), compileCSSBlock(), compileMedia(), compileNestedBlock(), compileRoot(), compileValue(), reduce(), and throwError().
Referenced by compile(), and compileProp().
|
protected |
Definition at line 241 of file lessc.inc.php.
References $out, compileProps(), compileSelectors(), makeOutputBlock(), multiplySelectors(), popEnv(), and pushEnv().
Referenced by compileBlock().
lessc::compileFile | ( | $fname, | |
$outFname = null |
|||
) |
Definition at line 1936 of file lessc.inc.php.
References $fname, $importDir, $out, addParsedFile(), array(), and compile().
Referenced by cachedCompile(), checkedCompile(), and parse().
|
protected |
Definition at line 179 of file lessc.inc.php.
References $importDir, $out, $sourceParser, array(), as, and compileProp().
Referenced by compileProp(), and tryImport().
|
protected |
Definition at line 255 of file lessc.inc.php.
References $query, array(), compileMediaQuery(), compileProps(), findClosestSelectors(), makeOutputBlock(), mediaParent(), multiplyMedia(), popEnv(), and pushEnv().
Referenced by compileBlock().
|
protected |
Definition at line 383 of file lessc.inc.php.
References $out, $queries, $query, array(), as, compileValue(), and reduce().
Referenced by compileMedia().
|
protected |
Definition at line 291 of file lessc.inc.php.
References compileProps(), makeOutputBlock(), popEnv(), and pushEnv().
Referenced by compileBlock().
|
protected |
Definition at line 703 of file lessc.inc.php.
References $args, $importDir, $name, $out, $parser, $path, $value, $vPrefix, array(), as, compileBlock(), compileImportedProps(), compileValue(), findBlocks(), list, popEnv(), pushEnv(), reduce(), set(), sortProps(), throwError(), tryImport(), and zipSetArgs().
Referenced by compileImportedProps(), and compileProps().
|
protected |
Definition at line 309 of file lessc.inc.php.
References $out, as, compileProp(), deduplicate(), and sortProps().
Referenced by compileCSSBlock(), compileMedia(), compileNestedBlock(), and compileRoot().
|
protected |
Definition at line 302 of file lessc.inc.php.
References compileProps(), makeOutputBlock(), popEnv(), and pushEnv().
Referenced by compileBlock().
|
protected |
Definition at line 504 of file lessc.inc.php.
References $out, $s, $value, array(), as, compileValue(), list, and reduce().
Referenced by compileCSSBlock().
lessc::compileValue | ( | $value | ) |
Compiles a primitive value into a CSS property value.
Values in lessphp are typed by being wrapped in arrays, their format is typically:
array(type, contents [, additional_contents]*)
The input is expected to be reduced. This function will not work on things like expressions and variables.
Definition at line 850 of file lessc.inc.php.
References $args, $name, $value, array(), as, coerceColor(), list, and throwError().
Referenced by compileBlock(), compileMediaQuery(), compileProp(), compileSelectors(), lib__sprintf(), lib_e(), lib_unit(), reduce(), and tryImport().
|
static |
Definition at line 112 of file lessc.inc.php.
References array().
Referenced by lessc_parser::expressionList(), and lessc_parser::propertyValue().
|
protected |
Deduplicate lines in a block.
Comments are not deduplicated. If a duplicate rule is detected, the comments immediately preceding each occurence are consolidated.
Definition at line 321 of file lessc.inc.php.
References $line, $lines, array(), and as.
Referenced by compileProps().
|
protected |
Definition at line 519 of file lessc.inc.php.
References $right.
Referenced by evaluate(), and patternMatch().
|
protected |
Definition at line 1646 of file lessc.inc.php.
References $fname, $out, $right, array(), coerceColor(), eq(), list, reduce(), stringConcatenate(), and toBool().
Referenced by reduce().
|
protected |
Definition at line 446 of file lessc.inc.php.
Referenced by multiplySelectors().
|
protected |
|
protected |
Definition at line 623 of file lessc.inc.php.
References $matches, $name, $path, array(), as, and patternMatchAll().
Referenced by compileProp().
|
protected |
Definition at line 457 of file lessc.inc.php.
Referenced by compileMedia(), and multiplySelectors().
|
protected |
Definition at line 97 of file lessc.inc.php.
References $dir, $file, array(), as, and fileExists().
Referenced by lib_data_uri(), and tryImport().
|
protected |
Definition at line 1708 of file lessc.inc.php.
References as.
Referenced by funcToColor(), lib_mix(), and op_color_color().
|
protected |
|
protected |
Convert the rgb, rgba, hsl color literals of function type as returned by the parser into values of color type.
Definition at line 1423 of file lessc.inc.php.
References $fname, array(), as, clamp(), fixColor(), reduce(), and toRGB().
Referenced by reduce().
|
protected |
Definition at line 1863 of file lessc.inc.php.
References $name, array(), and throwError().
Referenced by reduce().
|
protected |
|
protected |
Definition at line 1066 of file lessc.inc.php.
References $args, array(), as, coerceColor(), compileValue(), lib_e(), and reduce().
|
protected |
Definition at line 950 of file lessc.inc.php.
References array(), and assertNumber().
|
protected |
Definition at line 1212 of file lessc.inc.php.
References $value, and coerceColor().
Referenced by lib_contrast(), and lib_mix().
|
protected |
Definition at line 1010 of file lessc.inc.php.
References lib_rgbahex().
|
protected |
Definition at line 945 of file lessc.inc.php.
References array(), and assertNumber().
|
protected |
Definition at line 940 of file lessc.inc.php.
References array(), and assertNumber().
lessc::lib_blue | ( | $color | ) |
Definition at line 1778 of file lessc.inc.php.
References coerceColor(), and throwError().
|
protected |
Definition at line 1099 of file lessc.inc.php.
References $value, array(), and assertNumber().
|
protected |
Definition at line 1269 of file lessc.inc.php.
References $args, $t, array(), assertColor(), assertNumber(), coerceColor(), lib_alpha(), and lib_luma().
|
protected |
Definition at line 936 of file lessc.inc.php.
References assertNumber().
|
protected |
Definition at line 1140 of file lessc.inc.php.
References $args, clamp(), colorArgs(), list, toHSL(), and toRGB().
|
protected |
Given an url, decide whether to output a regular link or the base64-encoded contents of the file.
array | $value | either an argument list (two strings) or a single string |
Definition at line 1020 of file lessc.inc.php.
References $mime, $value, and findImport().
|
protected |
Definition at line 1164 of file lessc.inc.php.
References $args, clamp(), colorArgs(), list, toHSL(), and toRGB().
|
protected |
Definition at line 1048 of file lessc.inc.php.
References array(), compileValue(), and throwError().
Referenced by lib__sprintf(), lib_unit(), reduce(), and tryImport().
|
protected |
Definition at line 959 of file lessc.inc.php.
References $value, assertArgs(), assertNumber(), and list.
|
protected |
Definition at line 1219 of file lessc.inc.php.
References $args, clamp(), colorArgs(), and list.
|
protected |
Definition at line 1189 of file lessc.inc.php.
References $args, clamp(), colorArgs(), and list.
|
protected |
Definition at line 1183 of file lessc.inc.php.
References $args, clamp(), colorArgs(), and list.
|
protected |
Definition at line 1094 of file lessc.inc.php.
References $value, array(), and assertNumber().
lessc::lib_green | ( | $color | ) |
Definition at line 1769 of file lessc.inc.php.
References coerceColor(), and throwError().
|
protected |
Definition at line 1195 of file lessc.inc.php.
References assertColor(), and toHSL().
|
protected |
Definition at line 976 of file lessc.inc.php.
References $value, coerceColor(), and toBool().
|
protected |
Definition at line 992 of file lessc.inc.php.
|
protected |
Definition at line 980 of file lessc.inc.php.
|
protected |
Definition at line 968 of file lessc.inc.php.
|
protected |
Definition at line 988 of file lessc.inc.php.
|
protected |
Definition at line 984 of file lessc.inc.php.
|
protected |
Definition at line 996 of file lessc.inc.php.
|
protected |
Definition at line 972 of file lessc.inc.php.
|
protected |
Definition at line 1148 of file lessc.inc.php.
References $args, clamp(), colorArgs(), list, toHSL(), and toRGB().
|
protected |
Definition at line 1205 of file lessc.inc.php.
References assertColor(), and toHSL().
|
protected |
Definition at line 1302 of file lessc.inc.php.
References coerceColor().
Referenced by lib_contrast().
|
protected |
Definition at line 1233 of file lessc.inc.php.
References $args, array(), assertColor(), fixColor(), lib_alpha(), list, and throwError().
|
protected |
Definition at line 923 of file lessc.inc.php.
References $args, assertArgs(), assertNumber(), and list.
|
protected |
Definition at line 1225 of file lessc.inc.php.
References array(), and assertNumber().
|
protected |
Definition at line 919 of file lessc.inc.php.
|
protected |
Definition at line 914 of file lessc.inc.php.
References $args, assertArgs(), assertNumber(), and list.
lessc::lib_red | ( | $color | ) |
Definition at line 1760 of file lessc.inc.php.
References coerceColor(), and throwError().
|
protected |
Definition at line 1000 of file lessc.inc.php.
References coerceColor(), and throwError().
Referenced by lib_argb().
|
protected |
Definition at line 1104 of file lessc.inc.php.
References $value, array(), and assertNumber().
|
protected |
Definition at line 1156 of file lessc.inc.php.
References $args, clamp(), colorArgs(), list, toHSL(), and toRGB().
|
protected |
Definition at line 1200 of file lessc.inc.php.
References assertColor(), and toHSL().
|
protected |
Definition at line 932 of file lessc.inc.php.
References assertNumber().
|
protected |
Definition at line 1172 of file lessc.inc.php.
References $args, colorArgs(), list, toHSL(), and toRGB().
|
protected |
Definition at line 955 of file lessc.inc.php.
References assertNumber().
|
protected |
Definition at line 928 of file lessc.inc.php.
References assertNumber().
|
protected |
Definition at line 1115 of file lessc.inc.php.
References array(), assertNumber(), compileValue(), lib_e(), and list.
|
protected |
Definition at line 1828 of file lessc.inc.php.
References $type, and array().
Referenced by compileCSSBlock(), compileMedia(), compileNestedBlock(), and compileRoot().
|
protected |
Definition at line 2061 of file lessc.inc.php.
References $name, $parser, and $preserveComments.
Referenced by compile(), and tryImport().
|
protected |
Definition at line 280 of file lessc.inc.php.
Referenced by compileMedia().
|
protected |
Definition at line 419 of file lessc.inc.php.
References $out, $queries, array(), and as.
Referenced by compileMedia().
|
protected |
Definition at line 473 of file lessc.inc.php.
References $count, $out, $s, array(), as, expandParentSelectors(), and findClosestSelectors().
Referenced by compileCSSBlock().
|
protected |
Definition at line 2072 of file lessc.inc.php.
Referenced by compile().
|
protected |
Definition at line 1730 of file lessc.inc.php.
References $out, $right, array(), as, fixColor(), and throwError().
Referenced by op_color_number().
|
protected |
Definition at line 1723 of file lessc.inc.php.
References op_color_color().
Referenced by op_number_color().
|
protected |
Definition at line 1717 of file lessc.inc.php.
References op_color_number().
|
protected |
Definition at line 1789 of file lessc.inc.php.
References $right, $value, array(), throwError(), and toBool().
lessc::parse | ( | $str = null , |
|
$initialVariables = null |
|||
) |
Definition at line 2036 of file lessc.inc.php.
References $out, $registeredVars, compile(), compileFile(), and setVariables().
|
protected |
Definition at line 523 of file lessc.inc.php.
References array(), as, eq(), popEnv(), pushEnv(), reduce(), and zipSetArgs().
Referenced by patternMatchAll().
|
protected |
Definition at line 606 of file lessc.inc.php.
References $matches, as, and patternMatch().
Referenced by findBlocks().
|
protected |
Definition at line 1850 of file lessc.inc.php.
Referenced by compileCSSBlock(), compileMedia(), compileNestedBlock(), compileProp(), compileRoot(), and patternMatch().
|
static |
Definition at line 117 of file lessc.inc.php.
Referenced by lessc_parser::__construct(), lessc_parser::literal(), lessc_parser::string(), and lessc_parser::to().
|
protected |
Definition at line 1839 of file lessc.inc.php.
Referenced by compileCSSBlock(), compileMedia(), compileNestedBlock(), compileProp(), compileRoot(), injectVariables(), and patternMatch().
|
protected |
Definition at line 1475 of file lessc.inc.php.
References $args, $f, $name, $out, $res, $ret, $value, array(), as, coerceColor(), compileValue(), evaluate(), funcToColor(), get(), lib_e(), list, and throwError().
Referenced by compileBlock(), compileMediaQuery(), compileProp(), compileSelectors(), evaluate(), funcToColor(), lib__sprintf(), patternMatch(), and zipSetArgs().
lessc::registerFunction | ( | $name, | |
$func | |||
) |
Definition at line 2087 of file lessc.inc.php.
References $name.
|
protected |
Definition at line 1857 of file lessc.inc.php.
Referenced by compileProp(), injectVariables(), and zipSetArgs().
lessc::setFormatter | ( | $name | ) |
Definition at line 2068 of file lessc.inc.php.
References $name.
lessc::setImportDir | ( | $dirs | ) |
Definition at line 2103 of file lessc.inc.php.
lessc::setPreserveComments | ( | $preserve | ) |
Definition at line 2083 of file lessc.inc.php.
lessc::setVariables | ( | $variables | ) |
Definition at line 2095 of file lessc.inc.php.
Referenced by parse().
|
protected |
Definition at line 339 of file lessc.inc.php.
References $vars, array(), and as.
Referenced by compileProp(), compileProps(), and tryImport().
|
protected |
Definition at line 1691 of file lessc.inc.php.
References $right, and coerceString().
Referenced by evaluate().
lessc::throwError | ( | $msg = null | ) |
Uses the current value of $this->count to show line and line number.
Definition at line 2123 of file lessc.inc.php.
Referenced by assertArgs(), assertColor(), assertNumber(), compileBlock(), compileProp(), compileValue(), get(), lib_blue(), lib_e(), lib_green(), lib_mix(), lib_red(), lib_rgbahex(), op_color_color(), op_number_number(), reduce(), and zipSetArgs().
lessc::toBool | ( | $a | ) |
Definition at line 1640 of file lessc.inc.php.
Referenced by evaluate(), lib_iscolor(), lib_isem(), lib_iskeyword(), lib_isnumber(), lib_ispercentage(), lib_ispixel(), lib_isrem(), lib_isstring(), and op_number_number().
|
protected |
Definition at line 1338 of file lessc.inc.php.
Referenced by lib_darken(), lib_desaturate(), lib_hue(), lib_lighten(), lib_lightness(), lib_saturate(), lib_saturation(), and lib_spin().
|
protected |
Converts a hsl array into a color value in rgb.
Expects H to be in range of 0 to 360, S and L in 0 to 100
Definition at line 1388 of file lessc.inc.php.
References $out, array(), and toRGB_helper().
Referenced by funcToColor(), lib_darken(), lib_desaturate(), lib_lighten(), lib_saturate(), and lib_spin().
|
protected |
Definition at line 1373 of file lessc.inc.php.
Referenced by toRGB().
|
protected |
Definition at line 121 of file lessc.inc.php.
References $dir, $out, $parser, addParsedFile(), allParsedFiles(), array(), as, coerceString(), compileImportedProps(), compileValue(), findImport(), flattenList(), lib_e(), list, makeParser(), and sortProps().
Referenced by compileProp().
lessc::unregisterFunction | ( | $name | ) |
Definition at line 2091 of file lessc.inc.php.
References $name.
lessc::unsetVariable | ( | $name | ) |
Definition at line 2099 of file lessc.inc.php.
References $name.
|
protected |
Definition at line 661 of file lessc.inc.php.
References $args, $last, $value, array(), as, reduce(), set(), and throwError().
Referenced by compileProp(), and patternMatch().
|
protected |
Definition at line 87 of file lessc.inc.php.
Referenced by allParsedFiles().
|
staticprotected |
Definition at line 2146 of file lessc.inc.php.
Definition at line 72 of file lessc.inc.php.
lessc::$importDir = '' |
Definition at line 83 of file lessc.inc.php.
Referenced by compileFile(), compileImportedProps(), and compileProp().
lessc::$importDisabled = false |
Definition at line 82 of file lessc.inc.php.
|
protected |
Definition at line 74 of file lessc.inc.php.
lessc::$mPrefix = '$' |
Definition at line 79 of file lessc.inc.php.
|
staticprotected |
Definition at line 94 of file lessc.inc.php.
|
protected |
Definition at line 85 of file lessc.inc.php.
lessc::$parentSelector = '&' |
Definition at line 80 of file lessc.inc.php.
|
protected |
Definition at line 76 of file lessc.inc.php.
Referenced by makeParser().
|
protected |
Definition at line 75 of file lessc.inc.php.
Referenced by parse().
|
protected |
Definition at line 92 of file lessc.inc.php.
|
protected |
Definition at line 91 of file lessc.inc.php.
Referenced by compileImportedProps().
Definition at line 71 of file lessc.inc.php.
|
static |
Definition at line 69 of file lessc.inc.php.
lessc::$vPrefix = '@' |
Definition at line 78 of file lessc.inc.php.
Referenced by compileProp().