Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 628 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: DeclarationBlock  - X-Ref

Declaration blocks are the parts of a css file which denote the rules belonging to a selector.
Declaration blocks usually appear directly inside a Document or another CSSList (mostly a MediaQuery).

__construct($iLineNo = 0)   X-Ref
No description

parse(ParserState $oParserState)   X-Ref
No description

setSelectors($mSelector)   X-Ref
No description

removeSelector($mSelector)   X-Ref
No description

getSelector()   X-Ref


setSelector($mSelector)   X-Ref


getSelectors()   X-Ref
Get selectors.

return: Selector[] Selectors.

expandShorthands()   X-Ref
Split shorthand declarations (e.g. +margin+ or +font+) into their constituent parts.


createShorthands()   X-Ref
Create shorthand declarations (e.g. +margin+ or +font+) whenever possible.


expandBorderShorthand()   X-Ref
Split shorthand border declarations (e.g. <tt>border: 1px red;</tt>)
Additional splitting happens in expandDimensionsShorthand
Multiple borders are not yet supported as of 3


expandDimensionsShorthand()   X-Ref
Split shorthand dimensional declarations (e.g. <tt>margin: 0px auto;</tt>)
into their constituent parts.
Handles margin, padding, border-color, border-style and border-width.


expandFontShorthand()   X-Ref
Convert shorthand font declarations
(e.g. <tt>font: 300 italic 11px/14px verdana, helvetica, sans-serif;</tt>)
into their constituent parts.


expandBackgroundShorthand()   X-Ref
No description

expandListStyleShorthand()   X-Ref
No description

createShorthandProperties(array $aProperties, $sShorthand)   X-Ref
No description

createBackgroundShorthand()   X-Ref
No description

createListStyleShorthand()   X-Ref
No description

createBorderShorthand()   X-Ref
Combine border-color, border-style and border-width into border
Should be run after create_dimensions_shorthand!


createDimensionsShorthand()   X-Ref
No description

createFontShorthand()   X-Ref
Looks for long format CSS font properties (e.g. <tt>font-weight</tt>) and
tries to convert them into a shorthand CSS <tt>font</tt> property.
At least font-size AND font-family must be present in order to create a shorthand declaration.


__toString()   X-Ref
No description

render(\Sabberworm\CSS\OutputFormat $oOutputFormat)   X-Ref
No description