class TypeValue extends Value (View source)

Properties

protected string $variable

The name of the LESS variable.

from  Value
protected $fontFamily

The font family.

protected $fontSize

The font size.

protected $color

The font color.

protected $lineHeight

The line height.

protected $letterSpacing

The letter spacing.

protected $fontStyle

The font style.

protected $fontWeight

The font weight.

protected $textDecoration

The text decoration.

protected $textTransform

The text transform.

Methods

__construct(string $variable = '')

Initialize the instance.

from  Value
string
getVariable()

Get the name of the LESS variable.

from  Value
string
toStyleString()

Get the CSS representation of this value.

array
toLessVariablesArray()

Get the LESS representation of this variable and associated values.

$this
setFontFamily(string $fontFamily)

Set the font family.

$this
setFontStyle(mixed $fontStyle)

Set the font style.

$this
setFontSize(SizeValue $fontSize)

Set the font size.

$this
setColor(ColorValue $color)

Set the font color.

$this
setFontWeight(string $fontWeight)

Set the font weight.

$this
setTextDecoration(string $textDecoration)

Set the text decoration.

$this
setTextTransform(string $textTransform)

Set the text transform.

$this
setLineHeight(SizeValue $lineHeight)

Set the line height.

$this
setLetterSpacing(SizeValue $letterSpacing)

Set the letter spacing.

getFontFamily()

Get the font family.

getFontSize()

Get the font size.

getFontWeight()

Get the font weight.

getColor()

Get the font color.

getTextDecoration()

Get the text decoration.

getTextTransform()

Get the text transform.

getFontStyle()

Get the font style.

getLetterSpacing()

Get the letter spacing.

getLineHeight()

Get the line height.

Details

__construct(string $variable = '')

Initialize the instance.

Parameters

string $variable

the name of the LESS variable

string getVariable()

Get the name of the LESS variable.

Return Value

string

string toStyleString()

Get the CSS representation of this value.

Return Value

string

See also

Value::toStyleString

array toLessVariablesArray()

Get the LESS representation of this variable and associated values.

Return Value

array

See also

Value::toLessVariablesArray

$this setFontFamily(string $fontFamily)

Set the font family.

Parameters

string $fontFamily

Return Value

$this

Examples

'Verdana'

$this setFontStyle(mixed $fontStyle)

Set the font style.

Parameters

mixed $fontStyle

Return Value

$this

Examples

'italic'
'none'

$this setFontSize(SizeValue $fontSize)

Set the font size.

Parameters

SizeValue $fontSize

Return Value

$this

$this setColor(ColorValue $color)

Set the font color.

Parameters

ColorValue $color

Return Value

$this

$this setFontWeight(string $fontWeight)

Set the font weight.

Parameters

string $fontWeight

Return Value

$this

$this setTextDecoration(string $textDecoration)

Set the text decoration.

Parameters

string $textDecoration

Return Value

$this

Examples

'underline'
'none'

$this setTextTransform(string $textTransform)

Set the text transform.

Parameters

string $textTransform

Return Value

$this

Examples

'uppercase'
'none'

$this setLineHeight(SizeValue $lineHeight)

Set the line height.

Parameters

SizeValue $lineHeight

Return Value

$this

$this setLetterSpacing(SizeValue $letterSpacing)

Set the letter spacing.

Parameters

SizeValue $letterSpacing

Return Value

$this

getFontFamily()

Get the font family.

Examples

'Verdana'

getFontSize()

Get the font size.

getFontWeight()

Get the font weight.

getColor()

Get the font color.

getTextDecoration()

Get the text decoration.

Examples

'underline'
'none'

getTextTransform()

Get the text transform.

getFontStyle()

Get the font style.

getLetterSpacing()

Get the letter spacing.

getLineHeight()

Get the line height.