FOFLessThis class is taken near verbatim (changes marked with **FOF** comment markers) from:
lessphp v0.3.9 http://leafo.net/lessphp
LESS css compiler, adapted from http://lesscss.org
Copyright 2012, Leaf Corcoran <leafot@gmail.com> Licensed under MIT or GPLv3, see LICENSE
THIS IS THIRD PARTY CODE. Code comments are mostly useless placeholders to stop phpcs from complaining...
Located in /libraries/fof/less/less.php (line 28)
void
compileImportedProps
(array $props, stdClass $block, string $out, FOFLessParser $sourceParser, string $importDir)
static mixed
$cssColors
= array(
static mixed
$defaultValue
= array("keyword", "") (line 74)
static mixed
$FALSE
= array("keyword", "false") (line 34)
static integer
$nextImportId
= 0 (line 81)
Uniquely identify imports
static mixed
$TRUE
= array("keyword", "true") (line 32)
static mixed
$VERSION
= "v0.3.9" (line 30)
mixed
$importDir
= '' (line 60)
mixed
$importDisabled
= false (line 58)
mixed
$libFunctions
= array() (line 36)
string
$mPrefix
= '$' (line 54)
Prefix of abstract blocks
mixed
$numberPrecision
= null (line 62)
mixed
$parentSelector
= '&' (line 56)
mixed
$preserveComments
= false (line 40)
mixed
$registeredVars
= array() (line 38)
mixed
$sourceLoc
= null (line 72)
FOFLessParser
$sourceParser
= null (line 70)
Set to the parser that generated the current line when compiling so we know how to create error messages
string
$vPrefix
= '@' (line 47)
Prefix of abstract properties
Compile file $in to file $out if $in is newer than $out Returns true when it compiles, false otherwise
Compile execute
Compresslist
Quote for regular expression
Initialize any static state, can initialize parser for a file
Assert color
Assert number
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.
Compile only if changed input has changed or output doesn't exist
Clamp
Coerce a value for use in color operation
Make something string like into a string
Helper function to get arguments for color manipulation functions.
takes a list that contains a color like thing and a percentage
Compile
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.
Compile CSS block
Compile file
Compile Imported Props
Compile media query
Compile nested block
Compile a prop and update $lines or $blocks appropriately
Compile props
Reduces selector expressions
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.
Equality check
Expand parent selectors
Does file $name exists? It's a simple proxy to JFile for now
Attempt to find blocks matched by path and args
Attempts to find the path of an import url, returns null for css files
Make sure a color's components don't go out of bounds
Turn list of length 1 into value type
Convert the rgb, rgba, hsl color literals of function type as returned by the parser into values of color type.
Get the highest occurrence entry for a name
Inject array of unparsed strings into environment as variables
Get the alpha of a color Defaults to 1 for non-colors or colors without an alpha
Third party code; your guess is as good as mine
Lib is percentage
mixes two colors by weight mix(@color1, @color2, @weight); http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html#mix-instance_method
Third party code; your guess is as good as mine
Make output block
Multiply media
Multiply $selectors against the nearest selectors in env
Op color color
Op color number
Op number color
Operator on two numbers
Parse and compile buffer
Pattern match
Pattern match all
Reduce
Register function
Set something in the current env
Set preserve comments
Sort props
String concatenate
Uses the current value of $this->count to show line and line number
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
To RGB helper
Try import
Unregister function
Sets all argument names in $args to either the default value or the one passed in through $values
Documentation generated on Tue, 19 Nov 2013 15:06:58 +0100 by phpDocumentor 1.4.3