Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 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