mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-65759 library: Add patch #115 for php-css-parser
Patch taken from Sabberworm/PHP-CSS-Parser#115 as specified in moodle_readme.txt
This commit is contained in:
parent
376eb15617
commit
c04b8fbe40
@ -212,6 +212,20 @@ abstract class CSSList implements Renderable, Commentable {
|
||||
array_splice($this->aContents, $iOffset, $iLength, $mReplacement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @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)
|
||||
@ -314,7 +328,7 @@ abstract class CSSList implements Renderable, Commentable {
|
||||
|
||||
return $sResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return true if the list can not be further outdented. Only important when rendering.
|
||||
*/
|
||||
|
@ -1,10 +1,7 @@
|
||||
PHP CSS Parser
|
||||
--------------
|
||||
|
||||
Import git ref: c3b01ef0a85824e86fd86a74a8154d8d5c34b0ff
|
||||
(master)
|
||||
|
||||
Downloaded from: https://github.com/sabberworm/PHP-CSS-Parser
|
||||
Downloaded from: https://github.com/sabberworm/PHP-CSS-Parser/releases/tag/8.3.0
|
||||
|
||||
Import procedure:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user