Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core_scss Class Reference

Moodle SCSS compiler class. More...

Inheritance diagram for core_scss:
ScssPhp\ScssPhp\Compiler

Public Member Functions

 add_variables (array $variables)
 Add variables.
 
 addFeature ($name)
 Add feature.
 
 addImportPath ($path)
 Add import path.
 
 addParsedFile ($path)
 Adds to list of parsed files.
 
 addVariables (array $variables)
 Replaces variables.
 
 append_raw_scss ($scss)
 Append raw SCSS to what's to compile.
 
 assertColor ($value, $varName=null)
 Assert value is a color.
 
 assertInteger ($value, $varName=null)
 Assert value is a integer.
 
 assertList ($value)
 Assert value is a list.
 
 assertMap ($value, $varName=null)
 Assert value is a map.
 
 assertNumber ($value, $varName=null)
 Assert value is a number.
 
 assertString ($value, $varName=null)
 Assert value is a string.
 
 compile ($code, $path=null)
 Compile scss.
 
 compileString ($source, $path=null)
 Compile scss.
 
 compileValue ($value, $quote=true)
 Compiles a primitive value into a CSS property value.
 
 error ($msg,... $args)
 Build an error (exception)
 
 errorArgsNumber ($functionName, $ExpectedArgs, $nbActual)
 
 escapeNonPrintableChars ($string, $inKeyword=false)
 Escape non printable chars in strings output as in dart-sass.
 
 findImport ($url, $currentDir=null)
 Return the file path for an import url if it exists.
 
 get ($name, $shouldThrow=true, Environment $env=null, $unreduced=false)
 Get variable.
 
 getArgumentListKeywords ($value)
 Gets the keywords of an argument list.
 
 getCompileOptions ()
 Get compiler options.
 
 getParsedFiles ()
 Returns list of parsed files.
 
 getSourcePosition ()
 Get source position.
 
 getStringText (array $value)
 Gets the text of a Sass string.
 
 getVariables ()
 Returns list of variables.
 
 isTruthy ($value)
 Is truthy?
 
 normalizeValue ($value)
 Normalize value.
 
 prepend_raw_scss ($scss)
 Prepend raw SCSS to what's to compile.
 
 registerFunction ($name, $callback, $argumentDeclaration=null)
 Register function.
 
 replaceVariables (array $variables)
 Replaces variables.
 
 set_file ($filepath)
 Set the file to compile from.
 
 setCharset ($charset)
 Configures the handling of non-ASCII outputs.
 
 setEncoding ($encoding)
 Set encoding.
 
 setErrorOuput ($handle)
 Set an alternative error output stream, for testing purpose only.
 
 setFormatter ($formatterName)
 Set formatter.
 
 setIgnoreErrors ($ignoreErrors)
 Ignore errors?
 
 setImportPaths ($path)
 Set import paths.
 
 setLineNumberStyle ($lineNumberStyle)
 Set line number style.
 
 setLogger (LoggerInterface $logger)
 Sets an alternative logger.
 
 setNumberPrecision ($numberPrecision)
 Set number precision.
 
 setOutputStyle ($style)
 Sets the output style.
 
 setSourceMap ($sourceMap)
 Enable/disable source maps.
 
 setSourceMapOptions ($sourceMapOptions)
 Set source map options.
 
 setVariables (array $variables)
 Set variables.
 
 throwError ($msg)
 Throw error (exception)
 
 to_css ()
 Compiles to CSS.
 
 toBool ($thing)
 Cast to boolean.
 
 toHSL ($red, $green, $blue)
 Convert RGB to HSL.
 
 toRGB ($hue, $saturation, $lightness)
 Convert HSL to RGB.
 
 unregisterFunction ($name)
 Unregister function.
 
 unsetVariable ($name)
 Unset variable.
 

Static Public Member Functions

static isCssImport ($url)
 Detects whether the import is a CSS import.
 
static isNativeFunction ($name)
 Check if a function is a native built-in scss function, for css parsing.
 
static normalizeNativeFunctionName ($name)
 Normalize native function name.
 

Public Attributes

const DEBUG_INFO = 2
 
const LINE_COMMENTS = 1
 
const SOURCE_MAP_FILE = 2
 
const SOURCE_MAP_INLINE = 1
 
const SOURCE_MAP_NONE = 0
 
const WITH_ALL = 7
 
const WITH_MEDIA = 2
 
const WITH_RULE = 1
 
const WITH_SUPPORTS = 4
 

Static Public Attributes

static $defaultValue = [Type::T_KEYWORD, '']
 
static $emptyList = [Type::T_LIST, '', []]
 
static $emptyMap = [Type::T_MAP, [], []]
 
static $emptyString = [Type::T_STRING, '"', []]
 
static $false = [Type::T_KEYWORD, 'false']
 
static $Infinity = [Type::T_KEYWORD, 'Infinity']
 
static $NaN = [Type::T_KEYWORD, 'NaN']
 
static $null = [Type::T_NULL]
 
static $nullString = [Type::T_STRING, '', []]
 
static $selfSelector = [Type::T_SELF]
 
static static static $true = [Type::T_KEYWORD, 'true']
 
static $with = [Type::T_KEYWORD, 'with']
 
static $without = [Type::T_KEYWORD, 'without']
 

Protected Member Functions

 adjustHsl ($color, $idx, $amount)
 
 alterColor (array $args, $operation, $fn)
 Helper function for adjust_color, change_color, and scale_color.
 
 appendOutputLine (OutputBlock $out, $type, $line)
 Append lines to the current output block: directly to the block or through a child if necessary.
 
 appendRootDirective ($line, $out, $allowed=[Type::T_COMMENT])
 Append a root directive like @import or @charset as near as the possible from the source code (keeping before comments, @import and @charset coming before in the source code)
 
 applyArguments ($argDef, $argValues, $storeInEnv=true, $reduce=true)
 Apply argument values per definition.
 
 backPropagateEnv ($store, $excludedVars=null)
 Propagate vars from a just poped Env (used in @each and @for)
 
 callNativeFunction ($name, $function, $prototype, $args)
 Call built-in and registered (PHP) functions.
 
 callScssFunction ($func, $argValues)
 Call SCSS @function.
 
 callStackMessage ($all=false, $limit=null)
 Beautify call stack for output.
 
 checkCompatibleTags ($tag1, $tag2)
 Check the compatibility between two tag names: if both are defined they should be identical or one has to be '*'.
 
 checkSelectorArgType ($arg, $maxDepth=2)
 Check variable type for getSelectorArg() function.
 
 coerceColor ($value, $inRGBFunction=false)
 Coerce value to color.
 
 coerceForExpression ($value)
 Coerce color for expression.
 
 coerceList ($item, $delim=',', $removeTrailingNull=false)
 Coerce something to list.
 
 coerceMap ($item)
 Coerce something to map.
 
 coercePercent ($value)
 Coerce value to a percentage.
 
 coerceString ($value)
 Coerce value to string.
 
 coerceValue ($value)
 Coerce a php value into a scss one.
 
 collapseSelectors ($selectors)
 Collapse selectors.
 
 combineSelectorSingle ($base, $other)
 Combine selector single.
 
 compactEnv (Environment $env)
 Convert env linked list to stack.
 
 compileAtRoot (Block $block)
 Compile at-root.
 
 compileBlock (Block $block)
 Recursively compiles a block.
 
 compileChild ($child, ScssPhp\ScssPhp\Formatter\OutputBlock $out)
 Compile child; returns a value to halt execution.
 
 compileChildren ($stms, OutputBlock $out, $traceName='')
 Compile children and return result.
 
 compileChildrenNoReturn ($stms, OutputBlock $out, $selfParent=null, $traceName='')
 Compile children and throw exception if unexpected at-return.
 
 compileColorPartValue ($value, $min, $max, $isInt=true)
 
 compileComment ($block)
 Compile root level comment.
 
 compileCommentValue ($value, $pushEnv=false)
 Compile the value of a comment that can have interpolation.
 
 compileDebugValue ($value)
 
 compileDirective ($directive, OutputBlock $out)
 Compile directive.
 
 compileDirectiveName ($directiveName)
 directive names can include some interpolation
 
 compileImport ($rawPath, OutputBlock $out, $once=false)
 Compile import; returns true if the value was something that could be imported.
 
 compileImportPath ($rawPath)
 
 compileKeyframeBlock (Block $block, $selectors)
 Compile keyframe block.
 
 compileMedia (Block $media)
 Compile media.
 
 compileMediaQuery ($queryList)
 Compile media query.
 
 compileNestedBlock (Block $block, $selectors)
 Compile nested block.
 
 compileNestedPropertiesBlock (Block $block, OutputBlock $out)
 Compile nested properties lines.
 
 compileRGBAValue ($value, $isAlpha=false)
 
 compileRoot (Block $rootBlock)
 Compile root.
 
 compileSelector ($selector)
 Compile selector to string; self(&) should have been replaced by now.
 
 compileSelectorPart ($piece)
 Compile selector part.
 
 compileStringContent ($string, $quote=true)
 Compile string content.
 
 compileWith ($withCondition)
 Compile @at-root's with: inclusion / without: exclusion into 2 lists uses to filter scope/env later.
 
 completeScope ($scope, $previousScope)
 found missing selector from a at-root compilation in the previous scope (if at-root is just enclosing a property, the selector is in the parent tree)
 
 cssValidArg ($arg, $allowed_function=[], $inFunction=false)
 
 escapeImportPathString ($path)
 
 evalSelector ($selector)
 Evaluate selector.
 
 evalSelectorPart ($part)
 Evaluate selector part; replaces all the interpolates, stripping quotes.
 
 evalSelectors ($selectors)
 Evaluate selectors.
 
 evaluateMediaQuery ($queryList)
 evaluate media query : compile internal value keeping the structure unchanged
 
 expToString ($exp, $keepParens=false)
 Reduce expression to string.
 
 extendOrReplaceSelectors ($selectors, $extendee, $extender, $replace=false)
 Extend/replace in selectors used by selector-extend and selector-replace that use the same logic.
 
 extractEnv ($envs)
 Convert env stack to singly linked list.
 
 extractInterpolation ($list)
 Extract interpolation; it doesn't need to be recursive, compileValue will handle that.
 
 extractRelationshipFromFragment (array $fragment)
 Extract a relationship from the fragment.
 
 filterScopeWithWithout ($scope, $with, $without)
 Filter at-root scope depending on with/without option.
 
 filterWithWithout ($envs, $with, $without)
 Filter env stack.
 
 findScopeSelectors ($scope, $depth)
 Find a selector by the depth node in the scope.
 
 findTagName ($parts)
 Find the html tag name in a selector parts list.
 
 fixColor ($c)
 Make sure a color's components don't go out of bounds.
 
 flattenList ($list)
 Flatten list.
 
 flattenSelectors (OutputBlock $block, $parentKey=null)
 Flatten selectors.
 
 flattenSelectorSingle ($single)
 Flatten selector single; joins together .classes and ids.
 
 fncall ($functionReference, $argValues)
 Function caller.
 
 formatOutputSelector ($selectors)
 Postprocess selector to output in right format.
 
 getBuiltinFunction ($name)
 Get built-in function.
 
 getFunctionReference ($name, $safeCopy=false)
 Find a function reference.
 
 getSelectorArg ($arg, $varname=null, $allowParent=false)
 Preprocess selector args.
 
 getStoreEnv ()
 Get store environment.
 
 glueFunctionSelectors ($parts)
 Glue parts of :not( or :nth-child( ... that are in general split in selectors parts.
 
 handleImportLoop ($name)
 Handle import loop.
 
 has ($name, Environment $env=null)
 Has variable?
 
 hasSelectorPlaceholder ($selector)
 Has selector placeholder?
 
 hueToRGB ($m1, $m2, $h)
 Hue to RGB helper.
 
 importFile ($path, OutputBlock $out)
 Import file.
 
 injectVariables (array $args)
 Inject variables.
 
 inspectFormatValue ($value, $force_enclosing_display=false)
 
 is_valid_file ($path)
 Is the given file valid for import ?
 
 isImmediateRelationshipCombinator ($value)
 Is the value a direct relationship combinator?
 
 isPseudoSelector ($part, &$matches)
 Test a part for being a pseudo selector.
 
 isSelfExtend ($target, $origin)
 Is self extend?
 
 isSuperPart ($superParts, $subParts)
 Test a part of super selector again a part of sub selector.
 
 isSuperSelector ($super, $sub)
 Test a $super selector again $sub.
 
 isWith ($block, $with, $without)
 Filter WITH rules.
 
 joinSelectors ($parent, $child, &$stillHasSelf, $selfParentSelectors=null)
 Join selectors; looks for & to replace, or append parent before child.
 
 libAbs ($args)
 
 libAdjustColor ($args)
 
 libAdjustHue ($args)
 
 libAlpha ($args)
 
 libAppend ($args)
 
 libBlue ($args)
 
 libCall ($args)
 
 libCeil ($args)
 
 libChangeColor ($args)
 
 libComparable ($args)
 
 libComplement ($args)
 
 libCounter ($args)
 Workaround IE7's content counter bug.
 
 libDarken ($args)
 
 libDesaturate ($args)
 
 libFadeIn ($args)
 
 libFadeOut ($args)
 
 libFeatureExists ($args)
 
 libFloor ($args)
 
 libFunctionExists ($args)
 
 libGetFunction ($args)
 
 libGlobalVariableExists ($args)
 
 libGrayscale ($args)
 
 libGreen ($args)
 
 libHsl ($args, $kwargs, $funcName='hsl')
 
 libHsla ($args, $kwargs)
 
 libHue ($args)
 
 libIeHexStr ($args)
 
 libIf ($args)
 
 libIndex ($args)
 
 libInspect ($args)
 
 libInvert ($args)
 
 libIsBracketed ($args)
 
 libIsSuperselector ($args)
 
 libJoin ($args)
 
 libKeywords ($args)
 
 libLength ($args)
 
 libLighten ($args)
 
 libLightness ($args)
 
 libListSeparator ($args)
 
 libMapGet ($args)
 
 libMapHasKey ($args)
 
 libMapKeys ($args)
 
 libMapMerge ($args)
 
 libMapRemove ($args)
 
 libMapValues ($args)
 
 libMax ($args)
 
 libMin ($args)
 
 libMix ($args)
 
 libMixinExists ($args)
 
 libNth ($args)
 
 libOpacify ($args)
 
 libOpacity ($args)
 
 libPercentage ($args)
 
 libQuote ($args)
 
 libRandom ($args)
 
 libRed ($args)
 
 libRgb ($args, $kwargs, $funcName='rgb')
 
 libRgba ($args, $kwargs)
 
 libRound ($args)
 
 libSaturate ($args)
 
 libSaturation ($args)
 
 libScaleColor ($args)
 
 libScssphpGlob ($args)
 
 libSelectorAppend ($args)
 
 libSelectorExtend ($args)
 
 libSelectorNest ($args)
 
 libSelectorParse ($args)
 
 libSelectorReplace ($args)
 
 libSelectorUnify ($args)
 
 libSetNth ($args)
 
 libSimpleSelectors ($args)
 
 libStrIndex ($args)
 
 libStrInsert ($args)
 
 libStrLength ($args)
 
 libStrSlice ($args)
 
 libToLowerCase ($args)
 
 libToUpperCase ($args)
 
 libTransparentize ($args)
 
 libTypeOf ($args)
 
 libUniqueId ()
 
 libUnit ($args)
 
 libUnitless ($args)
 
 libUnquote ($args)
 
 libVariableExists ($args)
 
 libZip ($args)
 
 listSeparatorForJoin ($list1, $sep)
 
 makeOutputBlock ($type, $selectors=null)
 Make output block.
 
 matchExtends ($selector, &$out, $from=0, $initial=true)
 Match extends.
 
 matchExtendsSingle ($rawSingle, &$outOrigin, $initial=true)
 Match extends single.
 
 matchPartInCompound ($part, $compound)
 Try to find a matching part in a compound:
 
 mediaParent (OutputBlock $scope)
 Media parent.
 
 mergeDirectRelationships ($selectors1, $selectors2)
 Merge direct relationships between selectors.
 
 mergeMediaTypes ($type1, $type2)
 Merge media types.
 
 mergeParts ($parts1, $parts2)
 Merge two part list taking care that.
 
 missingSelectors ()
 Report missing selectors.
 
 multiplyMedia (Environment $env=null, $childQueries=null)
 Multiply media.
 
 multiplySelectors (Environment $env, $selfParent=null)
 Find the final set of selectors.
 
 normalizeName ($name)
 Normalize name.
 
 opAdd ($left, $right)
 Add strings.
 
 opAddNumberNumber (Number $left, Number $right)
 Add numbers.
 
 opAnd ($left, $right, $shouldEval)
 Boolean and.
 
 opColorColor ($op, $left, $right)
 Compare colors.
 
 opColorNumber ($op, $left, Number $right)
 Compare color and number.
 
 opDivNumberNumber (Number $left, Number $right)
 Divide numbers.
 
 opEq ($left, $right)
 Compare number1 == number2.
 
 opEqNumberNumber (Number $left, Number $right)
 Compare number1 == number2.
 
 opGteNumberNumber (Number $left, Number $right)
 Compare number1 >= number2.
 
 opGtNumberNumber (Number $left, Number $right)
 Compare number1 > number2.
 
 opLteNumberNumber (Number $left, Number $right)
 Compare number1 <= number2.
 
 opLtNumberNumber (Number $left, Number $right)
 Compare number1 < number2.
 
 opModNumberNumber (Number $left, Number $right)
 Mod numbers.
 
 opMulNumberNumber (Number $left, Number $right)
 Multiply numbers.
 
 opNeq ($left, $right)
 Compare number1 != number2.
 
 opNeqNumberNumber (Number $left, Number $right)
 Compare number1 != number2.
 
 opNumberColor ($op, Number $left, $right)
 Compare number and color.
 
 opOr ($left, $right, $shouldEval)
 Boolean or.
 
 opSubNumberNumber (Number $left, Number $right)
 Subtract numbers.
 
 parserFactory ($path)
 Instantiate parser.
 
 popCallStack ()
 
 popEnv ()
 Pop environment.
 
 prependSelectors ($selectors, $parts)
 Prepend each selector from $selectors with $parts.
 
 pushCallStack ($name='')
 
 pushEnv (Block $block=null)
 Push environment.
 
 pushExtends ($target, $origin, $block)
 Push extends.
 
 pushOrMergeExtentedSelector (&$out, $extended)
 Push extended selector except if.
 
 reduce ($value, $inExp=false)
 Reduce value.
 
 replaceSelfSelector ($selectors, $replace=null)
 Parse down the selector and revert [self] to "&" before a reparsing.
 
 selectorAppend ($selectors)
 Append parts of the last selector in the list to the previous, recursively.
 
 set ($name, $value, $shadow=false, Environment $env=null, $valueUnreduced=null)
 Set variable.
 
 setExisting ($name, $value, Environment $env, $valueUnreduced=null)
 Set existing variable.
 
 setRaw ($name, $value, Environment $env, $valueUnreduced=null)
 Set raw variable.
 
 shouldEval ($value)
 Should $value cause its operand to eval.
 
 sortNativeFunctionArgs ($functionName, $prototypes, $args)
 Sorts keyword arguments.
 
 stringifyFncallArgs ($arg)
 Reformat fncall arguments to proper css function output.
 
 stringTransformAsciiOnly ($stringContent, $filter)
 Apply a filter on a string content, only on ascii chars let extended chars untouched.
 
 testWithWithout ($what, $with, $without)
 Test a single type of block against with/without lists.
 
 unifyCompoundSelectors ($compound1, $compound2)
 The selector-unify magic as its best (at least works as expected on test cases)
 

Protected Attributes

bool null $charsetSeen
 
array< int, $importPaths=[];protected array< string, $importCache=[];protected string[] $importedFiles=[];protected array $userFunctions=[];protected array< string, $registeredVars=[];protected array< string, $registeredFeatures=['extend-selector-pseudoclass'=> false, 'at-error'=> true, 'units-level-3'=> true, 'global-variable-shadowing'=> string null $encoding = null
 
ScssPhp ScssPhp Compiler Environment $env
 
Formatter $formatter
 
null $lineNumberStyle = null
 
OutputBlock null $rootBlock
 
Environment $rootEnv
 
OutputBlock null $scope
 
array $scsscontent = array()
 Bits of SCSS content.
 
string $scssfile
 The path to the SCSS file.
 
array $scssprepend = array()
 Bits of SCSS content to prepend.
 
int SourceMapGenerator $sourceMap = self::SOURCE_MAP_NONE
 @phpstan-var self\SOURCE_MAP_*|SourceMapGenerator
 
array $sourceMapOptions = []
 @phpstan-var array{sourceRoot?: string, sourceMapFilename?: string|null, sourceMapURL?: string|null, sourceMapWriteTo?: string|null, outputSourceFiles?: bool, sourceMapRootpath?: string, sourceMapBasepath?: string}
 
Environment null $storeEnv
 
array< int, $importPaths=[];protected array< string, $importCache=[];protected string[] $importedFiles=[];protected array $userFunctions=[];protected array< string, $registeredVars=[];protected array< string, $registeredFeatures=['extend-selector-pseudoclass'=> false, 'at-error'=> true, 'units-level-3'=> true, 'global-variable-shadowing'=> false
 string|callable>
 
array< int, $sourceNames;protected Cache|null $cache;protected bool $cacheCheckImportResolutions=false;protected int $indentLevel;protected array[] $extends;protected array< string, $extendsMap;protected array< string, $parsedFiles=[];protected Parser|null $parser;protected int|null $sourceIndex;protected int|null $sourceLine;protected int|null $sourceColumn;protected bool|null $shouldEvaluate;protected null $ignoreErrors;protected bool $ignoreCallStackMessage=false;protected array[] $callStack=[];private array $resolvedImports=[];private string|null $currentDirectory;private string $rootDirectory;private bool $legacyCwdImportPath=true;private LoggerInterface $logger;private array< string, $warnedChildFunctions=[];public function __construct( $cacheOptions=null) { $this->sourceNames=[];if( $cacheOptions) { $this->cache=new Cache( $cacheOptions);if(!empty( $cacheOptions[ 'checkImportResolutions'])) { $this->cacheCheckImportResolutions=true;} } $this-> logger = new StreamLogger(fopen('php://stderr', 'w'), true)
 string|null>
 

Static Protected Attributes

static $libAbs = ['number']
 
static $libAdjustColor = ['color', 'kwargs...']
 
static $libAdjustHue = ['color', 'degrees']
 
static $libAlpha = ['color']
 
static $libAppend = ['list', 'val', 'separator:auto']
 
static $libBlue = ['color']
 
static $libCall = ['function', 'args...']
 
static $libCeil = ['number']
 
static $libChangeColor = ['color', 'kwargs...']
 
static $libComparable
 
static $libComplement = ['color']
 
static $libCounter = ['args...']
 
static $libDarken = ['color', 'amount']
 
static $libDesaturate = ['color', 'amount']
 
static $libFadeIn = ['color', 'amount']
 
static $libFadeOut = ['color', 'amount']
 
static $libFeatureExists = ['feature']
 
static $libFloor = ['number']
 
static $libFunctionExists = ['name']
 
static $libGetFunction
 
static $libGlobalVariableExists = ['name']
 
static $libGrayscale = ['color']
 
static $libGreen = ['color']
 
static $libHsl
 
static $libHsla
 
static $libHue = ['color']
 
static $libIeHexStr = ['color']
 
static $libIf = ['condition', 'if-true', 'if-false:']
 
static $libIndex = ['list', 'value']
 
static $libInspect = ['value']
 
static $libInvert = ['color', 'weight:100%']
 
static $libIsBracketed = ['list']
 
static $libIsSuperselector = ['super', 'sub']
 
static $libJoin = ['list1', 'list2', 'separator:auto', 'bracketed:auto']
 
static $libKeywords = ['args']
 
static $libLength = ['list']
 
static $libLighten = ['color', 'amount']
 
static $libLightness = ['color']
 
static $libListSeparator = ['list']
 
static $libMapGet = ['map', 'key', 'keys...']
 
static $libMapHasKey = ['map', 'key', 'keys...']
 
static $libMapKeys = ['map']
 
static $libMapMerge
 
static $libMapRemove
 
static $libMapValues = ['map']
 
static $libMax = ['numbers...']
 
static $libMin = ['numbers...']
 
static $libMix
 
static $libMixinExists = ['name']
 
static $libNth = ['list', 'n']
 
static $libOpacify = ['color', 'amount']
 
static $libOpacity = ['color']
 
static $libPercentage = ['number']
 
static $libQuote = ['string']
 
static $libRandom = ['limit:null']
 
static $libRed = ['color']
 
static $libRgb
 
static $libRgba
 
static $libRound = ['number']
 
static $libSaturate = [['color', 'amount'], ['amount']]
 
static $libSaturation = ['color']
 
static $libScaleColor = ['color', 'kwargs...']
 
static $libScssphpGlob = ['pattern']
 
static $libSelectorAppend = ['selector...']
 
static $libSelectorExtend
 
static $libSelectorNest = ['selector...']
 
static $libSelectorParse
 
static $libSelectorReplace
 
static $libSelectorUnify = ['selectors1', 'selectors2']
 
static $libSetNth = ['list', 'n', 'value']
 
static $libSimpleSelectors = ['selector']
 
static $libStrIndex = ['string', 'substring']
 
static $libStrInsert = ['string', 'insert', 'index']
 
static $libStrLength = ['string']
 
static $libStrSlice = ['string', 'start-at', 'end-at:-1']
 
static $libToLowerCase = ['string']
 
static $libToUpperCase = ['string']
 
static $libTransparentize = ['color', 'amount']
 
static $libTypeOf = ['value']
 
static $libUniqueId = []
 
static $libUnit = ['number']
 
static $libUnitless = ['number']
 
static $libUnquote = ['string']
 
static $libVariableExists = ['name']
 
static $libZip = ['lists...']
 
static static array< string, $namespaces=['special'=>
 string>
 
static array< string, $operatorNames=['+'=>
 string>
 

Detailed Description

Moodle SCSS compiler class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ add_variables()

core_scss::add_variables ( array $variables)

Add variables.

Parameters
array$scssAssociative array of variables and their values.
Return values
void

◆ addFeature()

ScssPhp\ScssPhp\Compiler::addFeature ( $name)
inherited

Add feature.

@api

Parameters
string$name
Return values
void
Deprecated
Registering additional features is deprecated.

◆ addImportPath()

ScssPhp\ScssPhp\Compiler::addImportPath ( $path)
inherited

Add import path.

@api

Parameters
string | callable$path
Return values
void

◆ addVariables()

ScssPhp\ScssPhp\Compiler::addVariables ( array $variables)
inherited

Replaces variables.

Parameters
array<string,mixed>$variables
Return values
void

◆ adjustHsl()

ScssPhp\ScssPhp\Compiler::adjustHsl ( $color,
$idx,
$amount )
protectedinherited
Parameters
array$color
int$idx
int | float$amount
Return values
array

◆ alterColor()

ScssPhp\ScssPhp\Compiler::alterColor ( array $args,
$operation,
$fn )
protectedinherited

Helper function for adjust_color, change_color, and scale_color.

Parameters
array<array|Number>$args
string$operation
callable$fn
Return values
array

@phpstan-param callable(float|int, float|int|null, float|int): (float|int) $fn

◆ append_raw_scss()

core_scss::append_raw_scss ( $scss)

Append raw SCSS to what's to compile.

Parameters
string$scssSCSS code.
Return values
void

◆ appendOutputLine()

ScssPhp\ScssPhp\Compiler::appendOutputLine ( OutputBlock $out,
$type,
$line )
protectedinherited

Append lines to the current output block: directly to the block or through a child if necessary.

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$out
string$type
string$line
Return values
void

◆ appendRootDirective()

ScssPhp\ScssPhp\Compiler::appendRootDirective ( $line,
$out,
$allowed = [Type::T_COMMENT] )
protectedinherited

Append a root directive like @import or @charset as near as the possible from the source code (keeping before comments, @import and @charset coming before in the source code)

Parameters
string$line
ScssPhp\ScssPhp\Formatter\OutputBlock$out
array$allowed
Return values
void

◆ applyArguments()

ScssPhp\ScssPhp\Compiler::applyArguments ( $argDef,
$argValues,
$storeInEnv = true,
$reduce = true )
protectedinherited

Apply argument values per definition.

Parameters
array[]$argDef
array | null$argValues
bool$storeInEnv
bool$reduceonly used if $storeInEnv = false
Return values
array<string,array|Number>

@phpstan-param list<array{0: string, 1: array|Number|null, 2: bool}> $argDef

Exceptions
Exception

◆ assertColor()

ScssPhp\ScssPhp\Compiler::assertColor ( $value,
$varName = null )
inherited

Assert value is a color.

@api

Parameters
array | Number$value
string | null$varName
Return values
array
Exceptions
SassScriptException

◆ assertInteger()

ScssPhp\ScssPhp\Compiler::assertInteger ( $value,
$varName = null )
inherited

Assert value is a integer.

@api

Parameters
array | Number$value
string | null$varName
Return values
int
Exceptions
SassScriptException

◆ assertList()

ScssPhp\ScssPhp\Compiler::assertList ( $value)
inherited

Assert value is a list.

@api

Parameters
array | Number$value
Return values
array
Exceptions
Exception

◆ assertMap()

ScssPhp\ScssPhp\Compiler::assertMap ( $value,
$varName = null )
inherited

Assert value is a map.

@api

Parameters
array | Number$value
string | null$varName
Return values
array
Exceptions
SassScriptException

◆ assertNumber()

ScssPhp\ScssPhp\Compiler::assertNumber ( $value,
$varName = null )
inherited

Assert value is a number.

@api

Parameters
array | Number$value
string | null$varName
Return values
Number
Exceptions
SassScriptException

◆ assertString()

ScssPhp\ScssPhp\Compiler::assertString ( $value,
$varName = null )
inherited

Assert value is a string.

This method deals with internal implementation details of the value representation where unquoted strings can sometimes be stored under other types. The returned value is always using the T_STRING type.

@api

Parameters
array | Number$value
string | null$varName
Return values
array
Exceptions
SassScriptException

◆ backPropagateEnv()

ScssPhp\ScssPhp\Compiler::backPropagateEnv ( $store,
$excludedVars = null )
protectedinherited

Propagate vars from a just poped Env (used in @each and @for)

Parameters
array$store
null | string[]$excludedVars
Return values
void

◆ callNativeFunction()

ScssPhp\ScssPhp\Compiler::callNativeFunction ( $name,
$function,
$prototype,
$args )
protectedinherited

Call built-in and registered (PHP) functions.

Parameters
string$name
callable$function
array$prototype
array$args
Return values
array|Number|null

◆ callScssFunction()

ScssPhp\ScssPhp\Compiler::callScssFunction ( $func,
$argValues )
protectedinherited

Call SCSS @function.

Parameters
CallableBlock | null$func
array$argValues
Return values
array|Number

◆ callStackMessage()

ScssPhp\ScssPhp\Compiler::callStackMessage ( $all = false,
$limit = null )
protectedinherited

Beautify call stack for output.

Parameters
bool$all
int | null$limit
Return values
string

◆ checkCompatibleTags()

ScssPhp\ScssPhp\Compiler::checkCompatibleTags ( $tag1,
$tag2 )
protectedinherited

Check the compatibility between two tag names: if both are defined they should be identical or one has to be '*'.

Parameters
string$tag1
string$tag2
Return values
array|false

◆ checkSelectorArgType()

ScssPhp\ScssPhp\Compiler::checkSelectorArgType ( $arg,
$maxDepth = 2 )
protectedinherited

Check variable type for getSelectorArg() function.

Parameters
array$arg
int$maxDepth
Return values
bool

◆ coerceColor()

ScssPhp\ScssPhp\Compiler::coerceColor ( $value,
$inRGBFunction = false )
protectedinherited

Coerce value to color.

Parameters
array | Number$value
bool$inRGBFunction
Return values
array|null

◆ coerceForExpression()

ScssPhp\ScssPhp\Compiler::coerceForExpression ( $value)
protectedinherited

Coerce color for expression.

Parameters
array | Number$value
Return values
array|Number

◆ coerceList()

ScssPhp\ScssPhp\Compiler::coerceList ( $item,
$delim = ',',
$removeTrailingNull = false )
protectedinherited

Coerce something to list.

Parameters
array | Number$item
string$delim
bool$removeTrailingNull
Return values
array

◆ coerceMap()

ScssPhp\ScssPhp\Compiler::coerceMap ( $item)
protectedinherited

Coerce something to map.

Parameters
array | Number$item
Return values
array|Number

◆ coercePercent()

ScssPhp\ScssPhp\Compiler::coercePercent ( $value)
protectedinherited

Coerce value to a percentage.

Parameters
array | Number$value
Return values
int|float
Deprecated

◆ coerceString()

ScssPhp\ScssPhp\Compiler::coerceString ( $value)
protectedinherited

Coerce value to string.

Parameters
array | Number$value
Return values
array

◆ coerceValue()

ScssPhp\ScssPhp\Compiler::coerceValue ( $value)
protectedinherited

Coerce a php value into a scss one.

Parameters
mixed$value
Return values
array|Number

◆ collapseSelectors()

ScssPhp\ScssPhp\Compiler::collapseSelectors ( $selectors)
protectedinherited

Collapse selectors.

Parameters
array$selectors
Return values
string

◆ combineSelectorSingle()

ScssPhp\ScssPhp\Compiler::combineSelectorSingle ( $base,
$other )
protectedinherited

Combine selector single.

Parameters
array$base
array$other
Return values
array

◆ compactEnv()

ScssPhp\ScssPhp\Compiler::compactEnv ( Environment $env)
protectedinherited

Convert env linked list to stack.

Parameters
Environment$env
Return values
Environment[]

@phpstan-return non-empty-array<Environment>

◆ compile()

core_scss::compile ( $code,
$path = null )

Compile scss.

Overrides ScssPHP's implementation, using the SassC compiler if it is available.

Parameters
string$codeSCSS to compile.
string$pathPath to SCSS to compile.
Return values
stringThe compiled CSS.

Reimplemented from ScssPhp\ScssPhp\Compiler.

◆ compileAtRoot()

ScssPhp\ScssPhp\Compiler::compileAtRoot ( Block $block)
protectedinherited

Compile at-root.

Parameters
ScssPhp\ScssPhp\Block$block
Return values
void

◆ compileBlock()

ScssPhp\ScssPhp\Compiler::compileBlock ( Block $block)
protectedinherited

Recursively compiles a block.

A block is analogous to a CSS block in most cases. A single SCSS document is encapsulated in a block when parsed, but it does not have parent tags so all of its children appear on the root level when compiled.

Blocks are made up of selectors and children.

The children of a block are just all the blocks that are defined within.

Compiling the block involves pushing a fresh environment on the stack, and iterating through the props, compiling each one.

See also
Compiler\compileChild()
Parameters
ScssPhp\ScssPhp\Block$block
Return values
void

◆ compileChild()

core_scss::compileChild ( $child,
ScssPhp\ScssPhp\Formatter\OutputBlock $out )
protected

Compile child; returns a value to halt execution.

Parameters
array$child
ScssPhp\ScssPhp\Formatter\OutputBlock$out
Return values
array|null

Reimplemented from ScssPhp\ScssPhp\Compiler.

◆ compileChildren()

ScssPhp\ScssPhp\Compiler::compileChildren ( $stms,
OutputBlock $out,
$traceName = '' )
protectedinherited

Compile children and return result.

Parameters
array$stms
ScssPhp\ScssPhp\Formatter\OutputBlock$out
string$traceName
Return values
array|Number|null

◆ compileChildrenNoReturn()

ScssPhp\ScssPhp\Compiler::compileChildrenNoReturn ( $stms,
OutputBlock $out,
$selfParent = null,
$traceName = '' )
protectedinherited

Compile children and throw exception if unexpected at-return.

Parameters
array[]$stms
ScssPhp\ScssPhp\Formatter\OutputBlock$out
ScssPhp\ScssPhp\Block$selfParent
string$traceName
Return values
void
Exceptions
Exception

◆ compileColorPartValue()

ScssPhp\ScssPhp\Compiler::compileColorPartValue ( $value,
$min,
$max,
$isInt = true )
protectedinherited
Parameters
mixed$value
int | float$min
int | float$max
bool$isInt
Return values
int|mixed

◆ compileComment()

ScssPhp\ScssPhp\Compiler::compileComment ( $block)
protectedinherited

Compile root level comment.

Parameters
array$block
Return values
void

◆ compileCommentValue()

ScssPhp\ScssPhp\Compiler::compileCommentValue ( $value,
$pushEnv = false )
protectedinherited

Compile the value of a comment that can have interpolation.

Parameters
array$value
bool$pushEnv
Return values
string

◆ compileDebugValue()

ScssPhp\ScssPhp\Compiler::compileDebugValue ( $value)
protectedinherited
Parameters
array | Number$value
Return values
string

◆ compileDirective()

ScssPhp\ScssPhp\Compiler::compileDirective ( $directive,
OutputBlock $out )
protectedinherited

Compile directive.

Parameters
DirectiveBlock | array$directive
ScssPhp\ScssPhp\Formatter\OutputBlock$out
Return values
void

◆ compileDirectiveName()

ScssPhp\ScssPhp\Compiler::compileDirectiveName ( $directiveName)
protectedinherited

directive names can include some interpolation

Parameters
string | array$directiveName
Return values
string
Exceptions
CompilerException

◆ compileImport()

ScssPhp\ScssPhp\Compiler::compileImport ( $rawPath,
OutputBlock $out,
$once = false )
protectedinherited

Compile import; returns true if the value was something that could be imported.

Parameters
array$rawPath
ScssPhp\ScssPhp\Formatter\OutputBlock$out
bool$once
Return values
bool

◆ compileImportPath()

ScssPhp\ScssPhp\Compiler::compileImportPath ( $rawPath)
protectedinherited
Parameters
array$rawPath
Return values
string
Exceptions
CompilerException

◆ compileKeyframeBlock()

ScssPhp\ScssPhp\Compiler::compileKeyframeBlock ( Block $block,
$selectors )
protectedinherited

Compile keyframe block.

Parameters
ScssPhp\ScssPhp\Block$block
string[]$selectors
Return values
void

◆ compileMedia()

ScssPhp\ScssPhp\Compiler::compileMedia ( Block $media)
protectedinherited

Compile media.

Parameters
ScssPhp\ScssPhp\Block$media
Return values
void

◆ compileMediaQuery()

ScssPhp\ScssPhp\Compiler::compileMediaQuery ( $queryList)
protectedinherited

Compile media query.

Parameters
array$queryList
Return values
string[]

◆ compileNestedBlock()

ScssPhp\ScssPhp\Compiler::compileNestedBlock ( Block $block,
$selectors )
protectedinherited

Compile nested block.

Parameters
ScssPhp\ScssPhp\Block$block
string[]$selectors
Return values
void

◆ compileNestedPropertiesBlock()

ScssPhp\ScssPhp\Compiler::compileNestedPropertiesBlock ( Block $block,
OutputBlock $out )
protectedinherited

Compile nested properties lines.

Parameters
ScssPhp\ScssPhp\Block$block
ScssPhp\ScssPhp\Formatter\OutputBlock$out
Return values
void

◆ compileRGBAValue()

ScssPhp\ScssPhp\Compiler::compileRGBAValue ( $value,
$isAlpha = false )
protectedinherited
Parameters
int | Number$value
bool$isAlpha
Return values
int|mixed

◆ compileRoot()

ScssPhp\ScssPhp\Compiler::compileRoot ( Block $rootBlock)
protectedinherited

Compile root.

Parameters
ScssPhp\ScssPhp\Block$rootBlock
Return values
void

◆ compileSelector()

ScssPhp\ScssPhp\Compiler::compileSelector ( $selector)
protectedinherited

Compile selector to string; self(&) should have been replaced by now.

Parameters
string | array$selector
Return values
string

◆ compileSelectorPart()

ScssPhp\ScssPhp\Compiler::compileSelectorPart ( $piece)
protectedinherited

Compile selector part.

Parameters
array$piece
Return values
string

◆ compileString()

ScssPhp\ScssPhp\Compiler::compileString ( $source,
$path = null )
inherited

Compile scss.

Parameters
string$source
string | null$path
Return values
CompilationResult
Exceptions
SassExceptionwhen the source fails to compile

◆ compileStringContent()

ScssPhp\ScssPhp\Compiler::compileStringContent ( $string,
$quote = true )
protectedinherited

Compile string content.

Parameters
array$string
bool$quote
Return values
string

◆ compileValue()

ScssPhp\ScssPhp\Compiler::compileValue ( $value,
$quote = true )
inherited

Compiles a primitive value into a CSS property value.

Values in scssphp 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.

@api

Parameters
array | Number$value
bool$quote
Return values
string

◆ compileWith()

ScssPhp\ScssPhp\Compiler::compileWith ( $withCondition)
protectedinherited

Compile @at-root's with: inclusion / without: exclusion into 2 lists uses to filter scope/env later.

Parameters
array | null$withCondition
Return values
array

@phpstan-return array{array<string, bool>, array<string, bool>}

◆ completeScope()

ScssPhp\ScssPhp\Compiler::completeScope ( $scope,
$previousScope )
protectedinherited

found missing selector from a at-root compilation in the previous scope (if at-root is just enclosing a property, the selector is in the parent tree)

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$scope
ScssPhp\ScssPhp\Formatter\OutputBlock$previousScope
Return values
OutputBlock

◆ cssValidArg()

ScssPhp\ScssPhp\Compiler::cssValidArg ( $arg,
$allowed_function = [],
$inFunction = false )
protectedinherited
Parameters
array | Number$arg
string[]$allowed_function
bool$inFunction
Return values
array|Number|false

◆ errorArgsNumber()

ScssPhp\ScssPhp\Compiler::errorArgsNumber ( $functionName,
$ExpectedArgs,
$nbActual )
inherited
Parameters
string$functionName
array$ExpectedArgs
int$nbActual
Return values
CompilerException
Deprecated

◆ escapeImportPathString()

ScssPhp\ScssPhp\Compiler::escapeImportPathString ( $path)
protectedinherited
Parameters
array$path
Return values
array
Exceptions
CompilerException

◆ evalSelector()

ScssPhp\ScssPhp\Compiler::evalSelector ( $selector)
protectedinherited

Evaluate selector.

Parameters
array$selector
Return values
array

@phpstan-impure

◆ evalSelectorPart()

ScssPhp\ScssPhp\Compiler::evalSelectorPart ( $part)
protectedinherited

Evaluate selector part; replaces all the interpolates, stripping quotes.

Parameters
array$part
Return values
array

@phpstan-impure

◆ evalSelectors()

ScssPhp\ScssPhp\Compiler::evalSelectors ( $selectors)
protectedinherited

Evaluate selectors.

Parameters
array$selectors
Return values
array

◆ evaluateMediaQuery()

ScssPhp\ScssPhp\Compiler::evaluateMediaQuery ( $queryList)
protectedinherited

evaluate media query : compile internal value keeping the structure unchanged

Parameters
array$queryList
Return values
array

◆ expToString()

ScssPhp\ScssPhp\Compiler::expToString ( $exp,
$keepParens = false )
protectedinherited

Reduce expression to string.

Parameters
array$exp
bool$keepParens
Return values
array

◆ extendOrReplaceSelectors()

ScssPhp\ScssPhp\Compiler::extendOrReplaceSelectors ( $selectors,
$extendee,
$extender,
$replace = false )
protectedinherited

Extend/replace in selectors used by selector-extend and selector-replace that use the same logic.

Parameters
array$selectors
array$extendee
array$extender
bool$replace
Return values
array

◆ extractEnv()

ScssPhp\ScssPhp\Compiler::extractEnv ( $envs)
protectedinherited

Convert env stack to singly linked list.

Parameters
Environment[]$envs
Return values
Environment

@phpstan-param non-empty-array<Environment> $envs

◆ extractInterpolation()

ScssPhp\ScssPhp\Compiler::extractInterpolation ( $list)
protectedinherited

Extract interpolation; it doesn't need to be recursive, compileValue will handle that.

Parameters
array$list
Return values
array

◆ extractRelationshipFromFragment()

ScssPhp\ScssPhp\Compiler::extractRelationshipFromFragment ( array $fragment)
protectedinherited

Extract a relationship from the fragment.

When extracting the last portion of a selector we will be left with a fragment which may end with a direction relationship combinator. This method will extract the relationship fragment and return it along side the rest.

Parameters
array$fragmentThe selector fragment maybe ending with a direction relationship combinator.
Return values
arrayThe selector without the relationship fragment if any, the relationship fragment.

◆ filterScopeWithWithout()

ScssPhp\ScssPhp\Compiler::filterScopeWithWithout ( $scope,
$with,
$without )
protectedinherited

Filter at-root scope depending on with/without option.

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$scope
array$with
array$without
Return values
OutputBlock

◆ filterWithWithout()

ScssPhp\ScssPhp\Compiler::filterWithWithout ( $envs,
$with,
$without )
protectedinherited

Filter env stack.

Parameters
Environment[]$envs
array$with
array$without
Return values
Environment

@phpstan-param non-empty-array<Environment> $envs

◆ findScopeSelectors()

ScssPhp\ScssPhp\Compiler::findScopeSelectors ( $scope,
$depth )
protectedinherited

Find a selector by the depth node in the scope.

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$scope
int$depth
Return values
array

◆ findTagName()

ScssPhp\ScssPhp\Compiler::findTagName ( $parts)
protectedinherited

Find the html tag name in a selector parts list.

Parameters
string[]$parts
Return values
string

◆ fixColor()

ScssPhp\ScssPhp\Compiler::fixColor ( $c)
protectedinherited

Make sure a color's components don't go out of bounds.

Parameters
array$c
Return values
array

◆ flattenList()

ScssPhp\ScssPhp\Compiler::flattenList ( $list)
protectedinherited

Flatten list.

Parameters
array$list
Return values
string
Deprecated

◆ flattenSelectors()

ScssPhp\ScssPhp\Compiler::flattenSelectors ( OutputBlock $block,
$parentKey = null )
protectedinherited

Flatten selectors.

Parameters
ScssPhp\ScssPhp\Formatter\OutputBlock$block
string$parentKey
Return values
void

◆ flattenSelectorSingle()

ScssPhp\ScssPhp\Compiler::flattenSelectorSingle ( $single)
protectedinherited

Flatten selector single; joins together .classes and ids.

Parameters
array$single
Return values
array

◆ fncall()

ScssPhp\ScssPhp\Compiler::fncall ( $functionReference,
$argValues )
protectedinherited

Function caller.

Parameters
string | array$functionReference
array$argValues
Return values
array|Number

◆ formatOutputSelector()

ScssPhp\ScssPhp\Compiler::formatOutputSelector ( $selectors)
protectedinherited

Postprocess selector to output in right format.

Parameters
array$selectors
Return values
array

◆ getArgumentListKeywords()

ScssPhp\ScssPhp\Compiler::getArgumentListKeywords ( $value)
inherited

Gets the keywords of an argument list.

Keys in the returned array are normalized names (underscores are replaced with dashes) without the leading $. Calling this helper with anything that an argument list received for a rest argument of the function argument declaration is not supported.

Parameters
array | Number$value
Return values
array<string,array|Number>

◆ getBuiltinFunction()

ScssPhp\ScssPhp\Compiler::getBuiltinFunction ( $name)
protectedinherited

Get built-in function.

Parameters
string$nameNormalized name
Return values
array

◆ getCompileOptions()

ScssPhp\ScssPhp\Compiler::getCompileOptions ( )
inherited

Get compiler options.

Return values
array<string,mixed>

◆ getFunctionReference()

ScssPhp\ScssPhp\Compiler::getFunctionReference ( $name,
$safeCopy = false )
protectedinherited

Find a function reference.

Parameters
string$name
bool$safeCopy
Return values
array

◆ getParsedFiles()

ScssPhp\ScssPhp\Compiler::getParsedFiles ( )
inherited

Returns list of parsed files.

Deprecated
Return values
array<string,int>

◆ getSelectorArg()

ScssPhp\ScssPhp\Compiler::getSelectorArg ( $arg,
$varname = null,
$allowParent = false )
protectedinherited

Preprocess selector args.

Parameters
array$arg
string | null$varname
bool$allowParent
Return values
array

◆ getSourcePosition()

ScssPhp\ScssPhp\Compiler::getSourcePosition ( )
inherited

Get source position.

@api

Return values
array
Deprecated

◆ getStoreEnv()

ScssPhp\ScssPhp\Compiler::getStoreEnv ( )
protectedinherited

Get store environment.

Return values
ScssPhp\ScssPhp\Compiler\Environment

◆ getStringText()

ScssPhp\ScssPhp\Compiler::getStringText ( array $value)
inherited

Gets the text of a Sass string.

Calling this method on anything else than a SassString is unsupported. Use {

See also
assertString} first to ensure that the value is indeed a string.
Parameters
array$value
Return values
string

◆ getVariables()

ScssPhp\ScssPhp\Compiler::getVariables ( )
inherited

Returns list of variables.

@api

Return values
array

◆ glueFunctionSelectors()

ScssPhp\ScssPhp\Compiler::glueFunctionSelectors ( $parts)
protectedinherited

Glue parts of :not( or :nth-child( ... that are in general split in selectors parts.

Parameters
array$parts
Return values
array

◆ handleImportLoop()

ScssPhp\ScssPhp\Compiler::handleImportLoop ( $name)
protectedinherited

Handle import loop.

Parameters
string$name
Return values
void
Exceptions
Exception

◆ has()

ScssPhp\ScssPhp\Compiler::has ( $name,
Environment $env = null )
protectedinherited

Has variable?

Parameters
string$name
ScssPhp\ScssPhp\Compiler\Environment$env
Return values
bool

◆ hasSelectorPlaceholder()

ScssPhp\ScssPhp\Compiler::hasSelectorPlaceholder ( $selector)
protectedinherited

Has selector placeholder?

Parameters
array$selector
Return values
bool

◆ hueToRGB()

ScssPhp\ScssPhp\Compiler::hueToRGB ( $m1,
$m2,
$h )
protectedinherited

Hue to RGB helper.

Parameters
float$m1
float$m2
float$h
Return values
float

◆ importFile()

ScssPhp\ScssPhp\Compiler::importFile ( $path,
OutputBlock $out )
protectedinherited

Import file.

Parameters
string$path
ScssPhp\ScssPhp\Formatter\OutputBlock$out
Return values
void

◆ injectVariables()

ScssPhp\ScssPhp\Compiler::injectVariables ( array $args)
protectedinherited

Inject variables.

Parameters
array$args
Return values
void

◆ inspectFormatValue()

ScssPhp\ScssPhp\Compiler::inspectFormatValue ( $value,
$force_enclosing_display = false )
protectedinherited
Parameters
array | Number$value
bool$force_enclosing_display
Return values
array

◆ is_valid_file()

core_scss::is_valid_file ( $path)
protected

Is the given file valid for import ?

Parameters
$path
Return values
bool

◆ isCssImport()

static ScssPhp\ScssPhp\Compiler::isCssImport ( $url)
staticinherited

Detects whether the import is a CSS import.

For legacy reasons, custom importers are called for those, allowing them to replace them with an actual Sass import. However this behavior is deprecated. Custom importers are expected to return null when they receive a CSS import.

Parameters
string$url
Return values
bool

◆ isImmediateRelationshipCombinator()

ScssPhp\ScssPhp\Compiler::isImmediateRelationshipCombinator ( $value)
protectedinherited

Is the value a direct relationship combinator?

Parameters
string$value
Return values
bool

◆ isPseudoSelector()

ScssPhp\ScssPhp\Compiler::isPseudoSelector ( $part,
& $matches )
protectedinherited

Test a part for being a pseudo selector.

Parameters
string$part
array$matches
Return values
bool

◆ isSelfExtend()

ScssPhp\ScssPhp\Compiler::isSelfExtend ( $target,
$origin )
protectedinherited

Is self extend?

Parameters
array$target
array$origin
Return values
bool

◆ isSuperPart()

ScssPhp\ScssPhp\Compiler::isSuperPart ( $superParts,
$subParts )
protectedinherited

Test a part of super selector again a part of sub selector.

Parameters
array$superParts
array$subParts
Return values
bool

◆ isSuperSelector()

ScssPhp\ScssPhp\Compiler::isSuperSelector ( $super,
$sub )
protectedinherited

Test a $super selector again $sub.

Parameters
array$super
array$sub
Return values
bool

◆ isTruthy()

ScssPhp\ScssPhp\Compiler::isTruthy ( $value)
inherited

Is truthy?

Parameters
array | Number$value
Return values
bool

◆ isWith()

ScssPhp\ScssPhp\Compiler::isWith ( $block,
$with,
$without )
protectedinherited

Filter WITH rules.

Parameters
ScssPhp\ScssPhp\Block | ScssPhp\ScssPhp\Formatter\OutputBlock$block
array$with
array$without
Return values
bool

◆ joinSelectors()

ScssPhp\ScssPhp\Compiler::joinSelectors ( $parent,
$child,
& $stillHasSelf,
$selfParentSelectors = null )
protectedinherited

Join selectors; looks for & to replace, or append parent before child.

Parameters
array$parent
array$child
bool$stillHasSelf
array$selfParentSelectors
Return values
array

◆ libCounter()

ScssPhp\ScssPhp\Compiler::libCounter ( $args)
protectedinherited

Workaround IE7's content counter bug.

Parameters
array$args
Return values
array

◆ libHsl()

ScssPhp\ScssPhp\Compiler::libHsl ( $args,
$kwargs,
$funcName = 'hsl' )
protectedinherited
Parameters
array$args
array$kwargs
string$funcName
Return values
array|null

◆ libRgb()

ScssPhp\ScssPhp\Compiler::libRgb ( $args,
$kwargs,
$funcName = 'rgb' )
protectedinherited
Parameters
array$args
array$kwargs
string$funcName
Return values
array

◆ listSeparatorForJoin()

ScssPhp\ScssPhp\Compiler::listSeparatorForJoin ( $list1,
$sep )
protectedinherited
Parameters
array$list1
array | Number | null$sep
Return values
string
Exceptions
CompilerException
Deprecated

◆ makeOutputBlock()

ScssPhp\ScssPhp\Compiler::makeOutputBlock ( $type,
$selectors = null )
protectedinherited

Make output block.

Parameters
string | null$type
string[] | null$selectors
Return values
ScssPhp\ScssPhp\Formatter\OutputBlock

◆ matchExtends()

ScssPhp\ScssPhp\Compiler::matchExtends ( $selector,
& $out,
$from = 0,
$initial = true )
protectedinherited

Match extends.

Parameters
array$selector
array$out
int$from
bool$initial
Return values
void

◆ matchExtendsSingle()

ScssPhp\ScssPhp\Compiler::matchExtendsSingle ( $rawSingle,
& $outOrigin,
$initial = true )
protectedinherited

Match extends single.

Parameters
array$rawSingle
array$outOrigin
bool$initial
Return values
bool

◆ matchPartInCompound()

ScssPhp\ScssPhp\Compiler::matchPartInCompound ( $part,
$compound )
protectedinherited

Try to find a matching part in a compound:

  • with same html tag name
  • with some class or id or something in common
Parameters
array$part
array$compound
Return values
array|false

◆ mediaParent()

ScssPhp\ScssPhp\Compiler::mediaParent ( OutputBlock $scope)
protectedinherited

◆ mergeDirectRelationships()

ScssPhp\ScssPhp\Compiler::mergeDirectRelationships ( $selectors1,
$selectors2 )
protectedinherited

Merge direct relationships between selectors.

Parameters
array$selectors1
array$selectors2
Return values
array

◆ mergeMediaTypes()

ScssPhp\ScssPhp\Compiler::mergeMediaTypes ( $type1,
$type2 )
protectedinherited

Merge media types.

Parameters
array$type1
array$type2
Return values
array|null

◆ mergeParts()

ScssPhp\ScssPhp\Compiler::mergeParts ( $parts1,
$parts2 )
protectedinherited

Merge two part list taking care that.

  • the html tag is coming first - if any
  • the :something are coming last
Parameters
array$parts1
array$parts2
Return values
array

◆ missingSelectors()

ScssPhp\ScssPhp\Compiler::missingSelectors ( )
protectedinherited

Report missing selectors.

Return values
void

◆ multiplyMedia()

ScssPhp\ScssPhp\Compiler::multiplyMedia ( Environment $env = null,
$childQueries = null )
protectedinherited

Multiply media.

Parameters
ScssPhp\ScssPhp\Compiler\Environment$env
array$childQueries
Return values
array

◆ multiplySelectors()

ScssPhp\ScssPhp\Compiler::multiplySelectors ( Environment $env,
$selfParent = null )
protectedinherited

Find the final set of selectors.

Parameters
ScssPhp\ScssPhp\Compiler\Environment$env
ScssPhp\ScssPhp\Block$selfParent
Return values
array

◆ normalizeName()

ScssPhp\ScssPhp\Compiler::normalizeName ( $name)
protectedinherited

Normalize name.

Parameters
string$name
Return values
string

◆ opAdd()

ScssPhp\ScssPhp\Compiler::opAdd ( $left,
$right )
protectedinherited

Add strings.

Parameters
array$left
array$right
Return values
array|null

◆ opAddNumberNumber()

ScssPhp\ScssPhp\Compiler::opAddNumberNumber ( Number $left,
Number $right )
protectedinherited

Add numbers.

Parameters
Number$left
Number$right
Return values
Number

◆ opAnd()

ScssPhp\ScssPhp\Compiler::opAnd ( $left,
$right,
$shouldEval )
protectedinherited

Boolean and.

Parameters
array | Number$left
array | Number$right
bool$shouldEval
Return values
array|Number|null

◆ opColorColor()

ScssPhp\ScssPhp\Compiler::opColorColor ( $op,
$left,
$right )
protectedinherited

Compare colors.

Parameters
string$op
array$left
array$right
Return values
array

◆ opColorNumber()

ScssPhp\ScssPhp\Compiler::opColorNumber ( $op,
$left,
Number $right )
protectedinherited

Compare color and number.

Parameters
string$op
array$left
Number$right
Return values
array

◆ opDivNumberNumber()

ScssPhp\ScssPhp\Compiler::opDivNumberNumber ( Number $left,
Number $right )
protectedinherited

Divide numbers.

Parameters
Number$left
Number$right
Return values
Number

◆ opEq()

ScssPhp\ScssPhp\Compiler::opEq ( $left,
$right )
protectedinherited

Compare number1 == number2.

Parameters
array | Number$left
array | Number$right
Return values
array

◆ opEqNumberNumber()

ScssPhp\ScssPhp\Compiler::opEqNumberNumber ( Number $left,
Number $right )
protectedinherited

Compare number1 == number2.

Parameters
Number$left
Number$right
Return values
array

◆ opGteNumberNumber()

ScssPhp\ScssPhp\Compiler::opGteNumberNumber ( Number $left,
Number $right )
protectedinherited

Compare number1 >= number2.

Parameters
Number$left
Number$right
Return values
array

◆ opGtNumberNumber()

ScssPhp\ScssPhp\Compiler::opGtNumberNumber ( Number $left,
Number $right )
protectedinherited

Compare number1 > number2.

Parameters
Number$left
Number$right
Return values
array

◆ opLteNumberNumber()

ScssPhp\ScssPhp\Compiler::opLteNumberNumber ( Number $left,
Number $right )
protectedinherited

Compare number1 <= number2.

Parameters
Number$left
Number$right
Return values
array

◆ opLtNumberNumber()

ScssPhp\ScssPhp\Compiler::opLtNumberNumber ( Number $left,
Number $right )
protectedinherited

Compare number1 < number2.

Parameters
Number$left
Number$right
Return values
array

◆ opModNumberNumber()

ScssPhp\ScssPhp\Compiler::opModNumberNumber ( Number $left,
Number $right )
protectedinherited

Mod numbers.

Parameters
Number$left
Number$right
Return values
Number

◆ opMulNumberNumber()

ScssPhp\ScssPhp\Compiler::opMulNumberNumber ( Number $left,
Number $right )
protectedinherited

Multiply numbers.

Parameters
Number$left
Number$right
Return values
Number

◆ opNeq()

ScssPhp\ScssPhp\Compiler::opNeq ( $left,
$right )
protectedinherited

Compare number1 != number2.

Parameters
array | Number$left
array | Number$right
Return values
array

◆ opNeqNumberNumber()

ScssPhp\ScssPhp\Compiler::opNeqNumberNumber ( Number $left,
Number $right )
protectedinherited

Compare number1 != number2.

Parameters
Number$left
Number$right
Return values
array

◆ opNumberColor()

ScssPhp\ScssPhp\Compiler::opNumberColor ( $op,
Number $left,
$right )
protectedinherited

Compare number and color.

Parameters
string$op
Number$left
array$right
Return values
array

◆ opOr()

ScssPhp\ScssPhp\Compiler::opOr ( $left,
$right,
$shouldEval )
protectedinherited

Boolean or.

Parameters
array | Number$left
array | Number$right
bool$shouldEval
Return values
array|Number|null

◆ opSubNumberNumber()

ScssPhp\ScssPhp\Compiler::opSubNumberNumber ( Number $left,
Number $right )
protectedinherited

Subtract numbers.

Parameters
Number$left
Number$right
Return values
Number

◆ parserFactory()

ScssPhp\ScssPhp\Compiler::parserFactory ( $path)
protectedinherited

Instantiate parser.

Parameters
string | null$path
Return values
ScssPhp\ScssPhp\Parser

◆ popCallStack()

ScssPhp\ScssPhp\Compiler::popCallStack ( )
protectedinherited
Return values
void

◆ popEnv()

ScssPhp\ScssPhp\Compiler::popEnv ( )
protectedinherited

Pop environment.

Return values
void

◆ prepend_raw_scss()

core_scss::prepend_raw_scss ( $scss)

Prepend raw SCSS to what's to compile.

Parameters
string$scssSCSS code.
Return values
void

◆ prependSelectors()

ScssPhp\ScssPhp\Compiler::prependSelectors ( $selectors,
$parts )
protectedinherited

Prepend each selector from $selectors with $parts.

Parameters
array$selectors
array$parts
Return values
array

◆ pushCallStack()

ScssPhp\ScssPhp\Compiler::pushCallStack ( $name = '')
protectedinherited
Parameters
string$name
Return values
void

◆ pushEnv()

ScssPhp\ScssPhp\Compiler::pushEnv ( Block $block = null)
protectedinherited

Push environment.

Parameters
ScssPhp\ScssPhp\Block$block
Return values
ScssPhp\ScssPhp\Compiler\Environment

◆ pushExtends()

ScssPhp\ScssPhp\Compiler::pushExtends ( $target,
$origin,
$block )
protectedinherited

Push extends.

Parameters
string[]$target
array$origin
array | null$block
Return values
void

◆ pushOrMergeExtentedSelector()

ScssPhp\ScssPhp\Compiler::pushOrMergeExtentedSelector ( & $out,
$extended )
protectedinherited

Push extended selector except if.

  • this is a pseudo selector
  • same as previous
  • in a white list in this case we merge the pseudo selector content
Parameters
array$out
array$extended
Return values
void

◆ reduce()

ScssPhp\ScssPhp\Compiler::reduce ( $value,
$inExp = false )
protectedinherited

Reduce value.

Parameters
array | Number$value
bool$inExp
Return values
array|Number

◆ registerFunction()

ScssPhp\ScssPhp\Compiler::registerFunction ( $name,
$callback,
$argumentDeclaration = null )
inherited

Register function.

@api

Parameters
string$name
callable$callback
string[] | null$argumentDeclaration
Return values
void

◆ replaceSelfSelector()

ScssPhp\ScssPhp\Compiler::replaceSelfSelector ( $selectors,
$replace = null )
protectedinherited

Parse down the selector and revert [self] to "&" before a reparsing.

Parameters
array$selectors
string | null$replace
Return values
array

◆ replaceVariables()

ScssPhp\ScssPhp\Compiler::replaceVariables ( array $variables)
inherited

Replaces variables.

Parameters
array<string,mixed>$variables
Return values
void

◆ selectorAppend()

ScssPhp\ScssPhp\Compiler::selectorAppend ( $selectors)
protectedinherited

Append parts of the last selector in the list to the previous, recursively.

Parameters
array$selectors
Return values
array
Exceptions
ScssPhp\ScssPhp\Exception\CompilerException

◆ set()

ScssPhp\ScssPhp\Compiler::set ( $name,
$value,
$shadow = false,
Environment $env = null,
$valueUnreduced = null )
protectedinherited

Set variable.

Parameters
string$name
mixed$value
bool$shadow
ScssPhp\ScssPhp\Compiler\Environment$env
mixed$valueUnreduced
Return values
void

◆ set_file()

core_scss::set_file ( $filepath)

Set the file to compile from.

The purpose of this method is to provide a way to import the content of a file without messing with the import directories.

Parameters
string$filepathThe path to the file.
Return values
void

◆ setCharset()

ScssPhp\ScssPhp\Compiler::setCharset ( $charset)
inherited

Configures the handling of non-ASCII outputs.

If $charset is true, this will include a @charset declaration or a UTF-8 byte-order mark if the stylesheet contains any non-ASCII characters. Otherwise, it will never include a @charset declaration or a byte-order mark.

Parameters
bool$charset
Return values
void

◆ setEncoding()

ScssPhp\ScssPhp\Compiler::setEncoding ( $encoding)
inherited

Set encoding.

@api

Parameters
string | null$encoding
Return values
void
Deprecated
Non-compliant support for other encodings than UTF-8 is deprecated.

◆ setErrorOuput()

ScssPhp\ScssPhp\Compiler::setErrorOuput ( $handle)
inherited

Set an alternative error output stream, for testing purpose only.

Parameters
resource$handle
Return values
void
Deprecated
Use {
See also
setLogger} instead

◆ setExisting()

ScssPhp\ScssPhp\Compiler::setExisting ( $name,
$value,
Environment $env,
$valueUnreduced = null )
protectedinherited

Set existing variable.

Parameters
string$name
mixed$value
ScssPhp\ScssPhp\Compiler\Environment$env
mixed$valueUnreduced
Return values
void

◆ setFormatter()

ScssPhp\ScssPhp\Compiler::setFormatter ( $formatterName)
inherited

Set formatter.

@api

Parameters
string$formatterName
Return values
void
Deprecated
Use {
See also
setOutputStyle} instead.

@phpstan-param class-string<Formatter> $formatterName

◆ setIgnoreErrors()

ScssPhp\ScssPhp\Compiler::setIgnoreErrors ( $ignoreErrors)
inherited

Ignore errors?

@api

Parameters
bool$ignoreErrors
Return values
ScssPhp\ScssPhp\Compiler
Deprecated
Ignoring Sass errors is not longer supported.

◆ setImportPaths()

ScssPhp\ScssPhp\Compiler::setImportPaths ( $path)
inherited

Set import paths.

@api

Parameters
string|array<string|callable>$path
Return values
void

◆ setLineNumberStyle()

ScssPhp\ScssPhp\Compiler::setLineNumberStyle ( $lineNumberStyle)
inherited

Set line number style.

@api

Parameters
string$lineNumberStyle
Return values
void
Deprecated
The line number output is not supported anymore. Use source maps instead.

◆ setLogger()

ScssPhp\ScssPhp\Compiler::setLogger ( LoggerInterface $logger)
inherited

Sets an alternative logger.

Changing the logger in the middle of the compilation is not supported and will result in an undefined behavior.

Parameters
LoggerInterface$logger
Return values
void

◆ setNumberPrecision()

ScssPhp\ScssPhp\Compiler::setNumberPrecision ( $numberPrecision)
inherited

Set number precision.

@api

Parameters
int$numberPrecision
Return values
void
Deprecated
The number precision is not configurable anymore. The default is enough for all browsers.

◆ setOutputStyle()

ScssPhp\ScssPhp\Compiler::setOutputStyle ( $style)
inherited

Sets the output style.

@api

Parameters
string$styleOne of the OutputStyle constants
Return values
void

@phpstan-param OutputStyle::* $style

◆ setRaw()

ScssPhp\ScssPhp\Compiler::setRaw ( $name,
$value,
Environment $env,
$valueUnreduced = null )
protectedinherited

Set raw variable.

Parameters
string$name
mixed$value
ScssPhp\ScssPhp\Compiler\Environment$env
mixed$valueUnreduced
Return values
void

◆ setSourceMap()

ScssPhp\ScssPhp\Compiler::setSourceMap ( $sourceMap)
inherited

Enable/disable source maps.

@api

Parameters
int$sourceMap
Return values
void

@phpstan-param self\SOURCE_MAP_* $sourceMap

◆ setSourceMapOptions()

ScssPhp\ScssPhp\Compiler::setSourceMapOptions ( $sourceMapOptions)
inherited

Set source map options.

@api

Parameters
array$sourceMapOptions

@phpstan-param array{sourceRoot?: string, sourceMapFilename?: string|null, sourceMapURL?: string|null, sourceMapWriteTo?: string|null, outputSourceFiles?: bool, sourceMapRootpath?: string, sourceMapBasepath?: string} $sourceMapOptions

Return values
void

◆ setVariables()

ScssPhp\ScssPhp\Compiler::setVariables ( array $variables)
inherited

Set variables.

@api

Parameters
array$variables
Return values
void
Deprecated
Use "addVariables" or "replaceVariables" instead.

◆ shouldEval()

ScssPhp\ScssPhp\Compiler::shouldEval ( $value)
protectedinherited

Should $value cause its operand to eval.

Parameters
array$value
Return values
bool

◆ sortNativeFunctionArgs()

ScssPhp\ScssPhp\Compiler::sortNativeFunctionArgs ( $functionName,
$prototypes,
$args )
protectedinherited

Sorts keyword arguments.

Parameters
string$functionName
array | null$prototypes
array$args
Return values
array|null

◆ stringifyFncallArgs()

ScssPhp\ScssPhp\Compiler::stringifyFncallArgs ( $arg)
protectedinherited

Reformat fncall arguments to proper css function output.

Parameters
array | Number$arg
Return values
array|Number

◆ stringTransformAsciiOnly()

ScssPhp\ScssPhp\Compiler::stringTransformAsciiOnly ( $stringContent,
$filter )
protectedinherited

Apply a filter on a string content, only on ascii chars let extended chars untouched.

Parameters
string$stringContent
callable$filter
Return values
string

◆ testWithWithout()

ScssPhp\ScssPhp\Compiler::testWithWithout ( $what,
$with,
$without )
protectedinherited

Test a single type of block against with/without lists.

Parameters
string$what
array$with
array$without
Return values
booltrue if the block should be kept, false to reject

◆ throwError()

ScssPhp\ScssPhp\Compiler::throwError ( $msg)
inherited

Throw error (exception)

@api

Parameters
string$msgMessage with optional sprintf()-style vararg parameters
Return values
never
Exceptions
ScssPhp\ScssPhp\Exception\CompilerException
Deprecated
use "error" and throw the exception in the caller instead.

◆ to_css()

core_scss::to_css ( )

Compiles to CSS.

Return values
string

◆ toBool()

ScssPhp\ScssPhp\Compiler::toBool ( $thing)
inherited

Cast to boolean.

@api

Parameters
bool$thing
Return values
array

◆ unifyCompoundSelectors()

ScssPhp\ScssPhp\Compiler::unifyCompoundSelectors ( $compound1,
$compound2 )
protectedinherited

The selector-unify magic as its best (at least works as expected on test cases)

Parameters
array$compound1
array$compound2
Return values
array

◆ unregisterFunction()

ScssPhp\ScssPhp\Compiler::unregisterFunction ( $name)
inherited

Unregister function.

@api

Parameters
string$name
Return values
void

◆ unsetVariable()

ScssPhp\ScssPhp\Compiler::unsetVariable ( $name)
inherited

Unset variable.

@api

Parameters
string$name
Return values
void

Member Data Documentation

◆ $charsetSeen

bool null ScssPhp\ScssPhp\Compiler::$charsetSeen
protectedinherited

◆ $Infinity

ScssPhp\ScssPhp\Compiler::$Infinity = [Type::T_KEYWORD, 'Infinity']
staticinherited

◆ $libComparable

ScssPhp\ScssPhp\Compiler::$libComparable
staticprotectedinherited
Initial value:
= [
['number1', 'number2'],
['number-1', 'number-2']
]

◆ $libGetFunction

ScssPhp\ScssPhp\Compiler::$libGetFunction
staticprotectedinherited
Initial value:
= [
['name'],
['name', 'css']
]

◆ $libHsl

ScssPhp\ScssPhp\Compiler::$libHsl
staticprotectedinherited
Initial value:
= [
['channels'],
['hue', 'saturation'],
['hue', 'saturation', 'lightness'],
['hue', 'saturation', 'lightness', 'alpha'] ]

◆ $libHsla

ScssPhp\ScssPhp\Compiler::$libHsla
staticprotectedinherited
Initial value:
= [
['channels'],
['hue', 'saturation'],
['hue', 'saturation', 'lightness'],
['hue', 'saturation', 'lightness', 'alpha']]

◆ $libMapMerge

ScssPhp\ScssPhp\Compiler::$libMapMerge
staticprotectedinherited
Initial value:
= [
['map1', 'map2'],
['map-1', 'map-2'],
['map1', 'args...']
]

◆ $libMapRemove

ScssPhp\ScssPhp\Compiler::$libMapRemove
staticprotectedinherited
Initial value:
= [
['map'],
['map', 'key', 'keys...'],
]

◆ $libMix

ScssPhp\ScssPhp\Compiler::$libMix
staticprotectedinherited
Initial value:
= [
['color1', 'color2', 'weight:50%'],
['color-1', 'color-2', 'weight:50%']
]

◆ $libRgb

ScssPhp\ScssPhp\Compiler::$libRgb
staticprotectedinherited
Initial value:
= [
['color'],
['color', 'alpha'],
['channels'],
['red', 'green', 'blue'],
['red', 'green', 'blue', 'alpha'] ]

◆ $libRgba

ScssPhp\ScssPhp\Compiler::$libRgba
staticprotectedinherited
Initial value:
= [
['color'],
['color', 'alpha'],
['channels'],
['red', 'green', 'blue'],
['red', 'green', 'blue', 'alpha'] ]

◆ $libSelectorExtend

ScssPhp\ScssPhp\Compiler::$libSelectorExtend
staticprotectedinherited
Initial value:
= [
['selector', 'extendee', 'extender'],
['selectors', 'extendee', 'extender']
]

◆ $libSelectorParse

ScssPhp\ScssPhp\Compiler::$libSelectorParse
staticprotectedinherited
Initial value:
= [
['selector'],
['selectors']
]

◆ $libSelectorReplace

ScssPhp\ScssPhp\Compiler::$libSelectorReplace
staticprotectedinherited
Initial value:
= [
['selector', 'original', 'replacement'],
['selectors', 'original', 'replacement']
]

◆ $lineNumberStyle

null ScssPhp\ScssPhp\Compiler::$lineNumberStyle = null
protectedinherited

◆ $NaN

ScssPhp\ScssPhp\Compiler::$NaN = [Type::T_KEYWORD, 'NaN']
staticinherited

◆ array< string, $namespaces=['special'=>

static ScssPhp\ScssPhp\Compiler::array< string, $namespaces=[ 'special'=>
staticprotectedinherited
Initial value:
=> 'sub',
'*' => 'mul',
'/' => 'div',
'%' => 'mod',
'==' => 'eq',
'!=' => 'neq',
'<' => 'lt',
'>' => 'gt',
'<=' => 'lte',
'>=' => 'gte',
]

string>

◆ DEBUG_INFO

const ScssPhp\ScssPhp\Compiler::DEBUG_INFO = 2
inherited

◆ LINE_COMMENTS

const ScssPhp\ScssPhp\Compiler::LINE_COMMENTS = 1
inherited

◆ WITH_ALL

const ScssPhp\ScssPhp\Compiler::WITH_ALL = 7
inherited

◆ WITH_MEDIA

const ScssPhp\ScssPhp\Compiler::WITH_MEDIA = 2
inherited

◆ WITH_RULE

const ScssPhp\ScssPhp\Compiler::WITH_RULE = 1
inherited

◆ WITH_SUPPORTS

const ScssPhp\ScssPhp\Compiler::WITH_SUPPORTS = 4
inherited

The documentation for this class was generated from the following file: