CSSList
in package
implements
Renderable, Commentable
A CSSList is the most generic container available. Its contents include RuleSet as well as other CSSList objects.
Also, it may contain Import and Charset objects stemming from @-rules.
Interfaces, Classes and Traits
Table of Contents
- $aComments : mixed
- $aContents : mixed
- $iLineNo : mixed
- __construct() : mixed
- __toString() : mixed
- addComments() : mixed
- append() : mixed
- Append item to list of contents.
- getComments() : array<string|int, mixed>
- getContents() : mixed
- getLineNo() : int
- isRootList() : mixed
- Return true if the list can not be further outdented. Only important when rendering.
- parseList() : mixed
- prepend() : mixed
- Prepend item to list of contents.
- remove() : bool
- Removes an item from the CSS list.
- removeDeclarationBlockBySelector() : mixed
- Removes a declaration block from the CSS list if it matches all given selectors.
- render() : mixed
- replace() : mixed
- Replaces an item from the CSS list.
- setComments() : mixed
- setContents() : mixed
- Set the contents.
- splice() : mixed
- Splice the list of contents.
- identifierIs() : mixed
- Tests an identifier for a given value. Since identifiers are all keywords, they can be vendor-prefixed. We need to check for these versions too.
- parseAtRule() : mixed
- parseListItem() : mixed
Properties
$aComments
protected
mixed
$aComments
$aContents
protected
mixed
$aContents
$iLineNo
protected
mixed
$iLineNo
Methods
__construct()
public
__construct(mixed $iLineNo) : mixed
Parameters
- $iLineNo : mixed
Return values
mixed —__toString()
public
__toString() : mixed
Return values
mixed —addComments()
public
addComments(array<string|int, mixed> $aComments) : mixed
Parameters
- $aComments : array<string|int, mixed>
-
Array of comments.
Return values
mixed —append()
Append item to list of contents.
public
append(object $oItem) : mixed
Parameters
- $oItem : object
-
Item.
Return values
mixed —getComments()
public
getComments() : array<string|int, mixed>
Return values
array<string|int, mixed> —getContents()
public
getContents() : mixed
Return values
mixed —getLineNo()
public
getLineNo() : int
Return values
int —isRootList()
Return true if the list can not be further outdented. Only important when rendering.
public
abstract isRootList() : mixed
Return values
mixed —parseList()
public
static parseList(ParserState $oParserState, CSSList $oList) : mixed
Parameters
- $oParserState : ParserState
- $oList : CSSList
Return values
mixed —prepend()
Prepend item to list of contents.
public
prepend(object $oItem) : mixed
Parameters
- $oItem : object
-
Item.
Return values
mixed —remove()
Removes an item from the CSS list.
public
remove(RuleSet|Import|Charset|CSSList $oItemToRemove) : bool
Parameters
- $oItemToRemove : RuleSet|Import|Charset|CSSList
-
May be a RuleSet (most likely a DeclarationBlock), a Import, a Charset or another CSSList (most likely a MediaQuery)
Return values
bool —Whether the item was removed.
removeDeclarationBlockBySelector()
Removes a declaration block from the CSS list if it matches all given selectors.
public
removeDeclarationBlockBySelector(array<string|int, mixed>|string $mSelector[, bool $bRemoveAll = false ]) : mixed
Parameters
- $mSelector : array<string|int, mixed>|string
-
The selectors to match.
- $bRemoveAll : bool = false
-
Whether to stop at the first declaration block found or remove all blocks
Return values
mixed —render()
public
render(OutputFormat $oOutputFormat) : mixed
Parameters
- $oOutputFormat : OutputFormat
Return values
mixed —replace()
Replaces an item from the CSS list.
public
replace(mixed $oOldItem, mixed $oNewItem) : mixed
Parameters
- $oOldItem : mixed
- $oNewItem : mixed
Return values
mixed —setComments()
public
setComments(array<string|int, mixed> $aComments) : mixed
Parameters
- $aComments : array<string|int, mixed>
-
Array containing Comment objects.
Return values
mixed —setContents()
Set the contents.
public
setContents(array<string|int, mixed> $aContents) : mixed
Parameters
- $aContents : array<string|int, mixed>
-
Objects to set as content.
Return values
mixed —splice()
Splice the list of contents.
public
splice(int $iOffset[, int $iLength = null ][, array<string|int, RuleSet> $mReplacement = null ]) : mixed
Parameters
- $iOffset : int
-
Offset.
- $iLength : int = null
-
Length. Optional.
- $mReplacement : array<string|int, RuleSet> = null
-
Replacement. Optional.
Return values
mixed —identifierIs()
Tests an identifier for a given value. Since identifiers are all keywords, they can be vendor-prefixed. We need to check for these versions too.
private
static identifierIs(mixed $sIdentifier, mixed $sMatch) : mixed
Parameters
- $sIdentifier : mixed
- $sMatch : mixed
Return values
mixed —parseAtRule()
private
static parseAtRule(ParserState $oParserState) : mixed
Parameters
- $oParserState : ParserState
Return values
mixed —parseListItem()
private
static parseListItem(ParserState $oParserState, CSSList $oList) : mixed
Parameters
- $oParserState : ParserState
- $oList : CSSList