mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-55381 php-css-parser: Patch for Sabberworm/PHP-CSS-Parser#115
REMOVE ME ONCE Sabberworm/PHP-CSS-Parser#115 is merged Part of MDL-55071
This commit is contained in:
parent
66bb9eadfe
commit
515ceadddd
2 changed files with 16 additions and 0 deletions
|
@ -35,6 +35,20 @@ abstract class CSSList implements Renderable, Commentable {
|
||||||
$this->aContents[] = $oItem;
|
$this->aContents[] = $oItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert an item before its sibling.
|
||||||
|
*
|
||||||
|
* @param mixed $oItem The item.
|
||||||
|
* @param mixed $oSibling The sibling.
|
||||||
|
*/
|
||||||
|
public function insert($oItem, $oSibling) {
|
||||||
|
$iIndex = array_search($oSibling, $this->aContents);
|
||||||
|
if ($iIndex === false) {
|
||||||
|
return $this->append($oItem);
|
||||||
|
}
|
||||||
|
array_splice($this->aContents, $iIndex, 0, array($oItem));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes an item from the CSS list.
|
* Removes an item from the CSS list.
|
||||||
* @param RuleSet|Import|Charset|CSSList $oItemToRemove May be a RuleSet (most likely a DeclarationBlock), a Import, a Charset or another CSSList (most likely a MediaQuery)
|
* @param RuleSet|Import|Charset|CSSList $oItemToRemove May be a RuleSet (most likely a DeclarationBlock), a Import, a Charset or another CSSList (most likely a MediaQuery)
|
||||||
|
|
|
@ -9,3 +9,5 @@ Downloaded from: https://github.com/sabberworm/PHP-CSS-Parser
|
||||||
Import procedure:
|
Import procedure:
|
||||||
|
|
||||||
- Copy all the files from the folder 'lib/Sabberworm/CSS/' in this directory.
|
- Copy all the files from the folder 'lib/Sabberworm/CSS/' in this directory.
|
||||||
|
|
||||||
|
- Apply the patch in Sabberworm/PHP-CSS-Parser#115
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue