\scssc

SCSS compiler

Summary

Methods
Properties
Constants
compile()
normalizeValue()
getParsedFiles()
addImportPath()
setImportPaths()
setFormatter()
registerFunction()
unregisterFunction()
toHSL()
hueToRGB()
toRGB()
$VERSION
$true
$false
$null
$defaultValue
$selfSelector
No constants found
isSelfExtend()
pushExtends()
makeOutputBlock()
matchExtendsSingle()
combineSelectorSingle()
matchExtends()
flattenSelectors()
compileRoot()
compileMedia()
mediaParent()
compileNestedBlock()
compileBlock()
flattenSelectorSingle()
evalSelector()
evalSelectorPart()
compileSelector()
compileSelectorPart()
hasSelectorPlaceholder()
compileChildren()
compileMediaQuery()
compileImport()
compileChild()
expToString()
isTruthy()
shouldEval()
reduce()
normalizeNumber()
coerceUnit()
op_add_number_number()
op_mul_number_number()
op_sub_number_number()
op_div_number_number()
op_mod_number_number()
op_add()
op_and()
op_or()
op_color_color()
op_color_number()
op_number_color()
op_eq()
op_neq()
op_gte_number_number()
op_gt_number_number()
op_lte_number_number()
op_lt_number_number()
toBool()
compileValue()
compileStringContent()
extractInterpolation()
multiplySelectors()
joinSelectors()
multiplyMedia()
coerceList()
applyArguments()
pushEnv()
normalizeName()
getStoreEnv()
set()
setExisting()
setRaw()
get()
popEnv()
importFile()
findImport()
fileExists()
callBuiltin()
sortArgs()
coerceForExpression()
coerceColor()
coerceString()
assertList()
assertColor()
assertNumber()
coercePercent()
fixColor()
lib_if()
lib_index()
lib_rgb()
lib_rgba()
alter_color()
adjust_color_helper()
lib_adjust_color()
change_color_helper()
lib_change_color()
scale_color_helper()
lib_scale_color()
lib_ie_hex_str()
lib_red()
lib_green()
lib_blue()
lib_alpha()
lib_opacity()
lib_mix()
lib_hsl()
lib_hsla()
lib_hue()
lib_saturation()
lib_lightness()
adjustHsl()
lib_adjust_hue()
lib_lighten()
lib_darken()
lib_saturate()
lib_desaturate()
lib_grayscale()
lib_complement()
lib_invert()
lib_opacify()
lib_fade_in()
lib_transparentize()
lib_fade_out()
lib_unquote()
lib_quote()
lib_percentage()
lib_round()
lib_floor()
lib_ceil()
lib_abs()
lib_min()
lib_max()
getNormalizedNumbers()
lib_length()
lib_nth()
listSeparatorForJoin()
lib_join()
lib_append()
lib_zip()
lib_type_of()
lib_unit()
lib_unitless()
lib_comparable()
throwError()
$operatorNames
$namespaces
$numberPrecision
$unitTable
$importPaths
$importCache
$userFunctions
$formatter
$lib_if
$lib_index
$lib_rgb
$lib_rgba
$lib_adjust_color
$lib_change_color
$lib_scale_color
$lib_ie_hex_str
$lib_red
$lib_green
$lib_blue
$lib_alpha
$lib_opacity
$lib_mix
$lib_hsl
$lib_hsla
$lib_hue
$lib_saturation
$lib_lightness
$lib_adjust_hue
$lib_lighten
$lib_darken
$lib_saturate
$lib_desaturate
$lib_grayscale
$lib_complement
$lib_invert
$lib_opacify
$lib_fade_in
$lib_transparentize
$lib_fade_out
$lib_unquote
$lib_quote
$lib_percentage
$lib_round
$lib_floor
$lib_ceil
$lib_abs
$lib_length
$lib_nth
$lib_join
$lib_append
$lib_type_of
$lib_unit
$lib_unitless
$lib_comparable
$cssColors
N/A
No private methods found
No private properties found
N/A

Properties

$VERSION

$VERSION

$true

$true

$false

$false

$null

$null

$defaultValue

$defaultValue

$selfSelector

$selfSelector

$operatorNames

$operatorNames

$namespaces

$namespaces

$numberPrecision

$numberPrecision

$unitTable

$unitTable

$importPaths

$importPaths

$importCache

$importCache

$userFunctions

$userFunctions

$formatter

$formatter

$lib_if

$lib_if

$lib_index

$lib_index

$lib_rgb

$lib_rgb

$lib_rgba

$lib_rgba

$lib_adjust_color

$lib_adjust_color

$lib_change_color

$lib_change_color

$lib_scale_color

$lib_scale_color

$lib_ie_hex_str

$lib_ie_hex_str

$lib_red

$lib_red

$lib_green

$lib_green

$lib_blue

$lib_blue

$lib_alpha

$lib_alpha

$lib_opacity

$lib_opacity

$lib_mix

$lib_mix

$lib_hsl

$lib_hsl

$lib_hsla

$lib_hsla

$lib_hue

$lib_hue

$lib_saturation

$lib_saturation

$lib_lightness

$lib_lightness

$lib_adjust_hue

$lib_adjust_hue

$lib_lighten

$lib_lighten

$lib_darken

$lib_darken

$lib_saturate

$lib_saturate

$lib_desaturate

$lib_desaturate

$lib_grayscale

$lib_grayscale

$lib_complement

$lib_complement

$lib_invert

$lib_invert

$lib_opacify

$lib_opacify

$lib_fade_in

$lib_fade_in

$lib_transparentize

$lib_transparentize

$lib_fade_out

$lib_fade_out

$lib_unquote

$lib_unquote

$lib_quote

$lib_quote

$lib_percentage

$lib_percentage

$lib_round

$lib_round

$lib_floor

$lib_floor

$lib_ceil

$lib_ceil

$lib_abs

$lib_abs

$lib_length

$lib_length

$lib_nth

$lib_nth

$lib_join

$lib_join

$lib_append

$lib_append

$lib_type_of

$lib_type_of

$lib_unit

$lib_unit

$lib_unitless

$lib_unitless

$lib_comparable

$lib_comparable

$cssColors

$cssColors

Methods

compile()

compile( $code,  $name)

Parameters

$code
$name

normalizeValue()

normalizeValue( $value)

Parameters

$value

getParsedFiles()

getParsedFiles()

addImportPath()

addImportPath( $path)

Parameters

$path

setImportPaths()

setImportPaths( $path)

Parameters

$path

setFormatter()

setFormatter( $formatterName)

Parameters

$formatterName

registerFunction()

registerFunction( $name,  $func)

Parameters

$name
$func

unregisterFunction()

unregisterFunction( $name)

Parameters

$name

toHSL()

toHSL( $red,  $green,  $blue)

Parameters

$red
$green
$blue

hueToRGB()

hueToRGB( $m1,  $m2,  $h)

Parameters

$m1
$m2
$h

toRGB()

toRGB( $hue,  $saturation,  $lightness)

Parameters

$hue
$saturation
$lightness

isSelfExtend()

isSelfExtend( $target,  $origin)

Parameters

$target
$origin

pushExtends()

pushExtends( $target,  $origin)

Parameters

$target
$origin

makeOutputBlock()

makeOutputBlock( $type,  $selectors)

Parameters

$type
$selectors

matchExtendsSingle()

matchExtendsSingle( $single,  $outOrigin)

Parameters

$single
$outOrigin

combineSelectorSingle()

combineSelectorSingle( $base,  $other)

Parameters

$base
$other

matchExtends()

matchExtends( $selector,  $out,  $from,  $initial)

Parameters

$selector
$out
$from
$initial

flattenSelectors()

flattenSelectors( $block,  $parentKey)

Parameters

$block
$parentKey

compileRoot()

compileRoot( $rootBlock)

Parameters

$rootBlock

compileMedia()

compileMedia( $media)

Parameters

$media

mediaParent()

mediaParent( $scope)

Parameters

$scope

compileNestedBlock()

compileNestedBlock( $block,  $selectors)

Parameters

$block
$selectors

compileBlock()

compileBlock(\StdClass $block)

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.

Parameters

\StdClass $block

flattenSelectorSingle()

flattenSelectorSingle( $single)

Parameters

$single

evalSelector()

evalSelector( $selector)

Parameters

$selector

evalSelectorPart()

evalSelectorPart( $piece)

Parameters

$piece

compileSelector()

compileSelector( $selector)

Parameters

$selector

compileSelectorPart()

compileSelectorPart( $piece)

Parameters

$piece

hasSelectorPlaceholder()

hasSelectorPlaceholder( $selector)

Parameters

$selector

compileChildren()

compileChildren( $stms,  $out)

Parameters

$stms
$out

compileMediaQuery()

compileMediaQuery( $queryList)

Parameters

$queryList

compileImport()

compileImport( $rawPath,  $out)

Parameters

$rawPath
$out

compileChild()

compileChild( $child,  $out)

Parameters

$child
$out

expToString()

expToString( $exp)

Parameters

$exp

isTruthy()

isTruthy( $value)

Parameters

$value

shouldEval()

shouldEval( $value)

Parameters

$value

reduce()

reduce( $value,  $inExp)

Parameters

$value
$inExp

normalizeNumber()

normalizeNumber( $number)

Parameters

$number

coerceUnit()

coerceUnit( $number,  $unit)

Parameters

$number
$unit

op_add_number_number()

op_add_number_number( $left,  $right)

Parameters

$left
$right

op_mul_number_number()

op_mul_number_number( $left,  $right)

Parameters

$left
$right

op_sub_number_number()

op_sub_number_number( $left,  $right)

Parameters

$left
$right

op_div_number_number()

op_div_number_number( $left,  $right)

Parameters

$left
$right

op_mod_number_number()

op_mod_number_number( $left,  $right)

Parameters

$left
$right

op_add()

op_add( $left,  $right)

Parameters

$left
$right

op_and()

op_and( $left,  $right,  $shouldEval)

Parameters

$left
$right
$shouldEval

op_or()

op_or( $left,  $right,  $shouldEval)

Parameters

$left
$right
$shouldEval

op_color_color()

op_color_color( $op,  $left,  $right)

Parameters

$op
$left
$right

op_color_number()

op_color_number( $op,  $left,  $right)

Parameters

$op
$left
$right

op_number_color()

op_number_color( $op,  $left,  $right)

Parameters

$op
$left
$right

op_eq()

op_eq( $left,  $right)

Parameters

$left
$right

op_neq()

op_neq( $left,  $right)

Parameters

$left
$right

op_gte_number_number()

op_gte_number_number( $left,  $right)

Parameters

$left
$right

op_gt_number_number()

op_gt_number_number( $left,  $right)

Parameters

$left
$right

op_lte_number_number()

op_lte_number_number( $left,  $right)

Parameters

$left
$right

op_lt_number_number()

op_lt_number_number( $left,  $right)

Parameters

$left
$right

toBool()

toBool( $thing)

Parameters

$thing

compileValue()

compileValue(array $value)

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.

Parameters

array $value

compileStringContent()

compileStringContent( $string)

Parameters

$string

extractInterpolation()

extractInterpolation( $list)

Parameters

$list

multiplySelectors()

multiplySelectors( $env)

Parameters

$env

joinSelectors()

joinSelectors( $parent,  $child)

Parameters

$parent
$child

multiplyMedia()

multiplyMedia( $env,  $childQueries)

Parameters

$env
$childQueries

coerceList()

coerceList( $item,  $delim)

Parameters

$item
$delim

applyArguments()

applyArguments( $argDef,  $argValues)

Parameters

$argDef
$argValues

pushEnv()

pushEnv( $block)

Parameters

$block

normalizeName()

normalizeName( $name)

Parameters

$name

getStoreEnv()

getStoreEnv()

set()

set( $name,  $value,  $shadow)

Parameters

$name
$value
$shadow

setExisting()

setExisting( $name,  $value,  $env)

Parameters

$name
$value
$env

setRaw()

setRaw( $name,  $value)

Parameters

$name
$value

get()

get( $name,  $defaultValue,  $env)

Parameters

$name
$defaultValue
$env

popEnv()

popEnv()

importFile()

importFile( $path,  $out)

Parameters

$path
$out

findImport()

findImport( $url)

Parameters

$url

fileExists()

fileExists( $name)

Parameters

$name

callBuiltin()

callBuiltin( $name,  $args,  $returnValue)

Parameters

$name
$args
$returnValue

sortArgs()

sortArgs( $prototype,  $args)

Parameters

$prototype
$args

coerceForExpression()

coerceForExpression( $value)

Parameters

$value

coerceColor()

coerceColor( $value)

Parameters

$value

coerceString()

coerceString( $value)

Parameters

$value

assertList()

assertList( $value)

Parameters

$value

assertColor()

assertColor( $value)

Parameters

$value

assertNumber()

assertNumber( $value)

Parameters

$value

coercePercent()

coercePercent( $value)

Parameters

$value

fixColor()

fixColor( $c)

Parameters

$c

lib_if()

lib_if( $args)

Parameters

$args

lib_index()

lib_index( $args)

Parameters

$args

lib_rgb()

lib_rgb( $args)

Parameters

$args

lib_rgba()

lib_rgba( $args)

Parameters

$args

alter_color()

alter_color( $args,  $fn)

Parameters

$args
$fn

adjust_color_helper()

adjust_color_helper( $base,  $alter,  $i)

Parameters

$base
$alter
$i

lib_adjust_color()

lib_adjust_color( $args)

Parameters

$args

change_color_helper()

change_color_helper( $base,  $alter,  $i)

Parameters

$base
$alter
$i

lib_change_color()

lib_change_color( $args)

Parameters

$args

scale_color_helper()

scale_color_helper( $base,  $scale,  $i)

Parameters

$base
$scale
$i

lib_scale_color()

lib_scale_color( $args)

Parameters

$args

lib_ie_hex_str()

lib_ie_hex_str( $args)

Parameters

$args

lib_red()

lib_red( $args)

Parameters

$args

lib_green()

lib_green( $args)

Parameters

$args

lib_blue()

lib_blue( $args)

Parameters

$args

lib_alpha()

lib_alpha( $args)

Parameters

$args

lib_opacity()

lib_opacity( $args)

Parameters

$args

lib_mix()

lib_mix( $args)

Parameters

$args

lib_hsl()

lib_hsl( $args)

Parameters

$args

lib_hsla()

lib_hsla( $args)

Parameters

$args

lib_hue()

lib_hue( $args)

Parameters

$args

lib_saturation()

lib_saturation( $args)

Parameters

$args

lib_lightness()

lib_lightness( $args)

Parameters

$args

adjustHsl()

adjustHsl( $color,  $idx,  $amount)

Parameters

$color
$idx
$amount

lib_adjust_hue()

lib_adjust_hue( $args)

Parameters

$args

lib_lighten()

lib_lighten( $args)

Parameters

$args

lib_darken()

lib_darken( $args)

Parameters

$args

lib_saturate()

lib_saturate( $args)

Parameters

$args

lib_desaturate()

lib_desaturate( $args)

Parameters

$args

lib_grayscale()

lib_grayscale( $args)

Parameters

$args

lib_complement()

lib_complement( $args)

Parameters

$args

lib_invert()

lib_invert( $args)

Parameters

$args

lib_opacify()

lib_opacify( $args)

Parameters

$args

lib_fade_in()

lib_fade_in( $args)

Parameters

$args

lib_transparentize()

lib_transparentize( $args)

Parameters

$args

lib_fade_out()

lib_fade_out( $args)

Parameters

$args

lib_unquote()

lib_unquote( $args)

Parameters

$args

lib_quote()

lib_quote( $args)

Parameters

$args

lib_percentage()

lib_percentage( $args)

Parameters

$args

lib_round()

lib_round( $args)

Parameters

$args

lib_floor()

lib_floor( $args)

Parameters

$args

lib_ceil()

lib_ceil( $args)

Parameters

$args

lib_abs()

lib_abs( $args)

Parameters

$args

lib_min()

lib_min( $args)

Parameters

$args

lib_max()

lib_max( $args)

Parameters

$args

getNormalizedNumbers()

getNormalizedNumbers( $args)

Parameters

$args

lib_length()

lib_length( $args)

Parameters

$args

lib_nth()

lib_nth( $args)

Parameters

$args

listSeparatorForJoin()

listSeparatorForJoin( $list1,  $sep)

Parameters

$list1
$sep

lib_join()

lib_join( $args)

Parameters

$args

lib_append()

lib_append( $args)

Parameters

$args

lib_zip()

lib_zip( $args)

Parameters

$args

lib_type_of()

lib_type_of( $args)

Parameters

$args

lib_unit()

lib_unit( $args)

Parameters

$args

lib_unitless()

lib_unitless( $args)

Parameters

$args

lib_comparable()

lib_comparable( $args)

Parameters

$args

throwError()

throwError( $msg)

Parameters

$msg