Skip to content

Commit 48e4380

Browse files
committed
Add of the removeSelector from Block (previously in the todo list)
1 parent 4c4ab98 commit 48e4380

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ public function setSelectors($mSelector) {
3636
}
3737
}
3838

39+
// remove one of the selector of the block
40+
public function removeSelector($mSelector) {
41+
$iKey = array_search($mSelector, $this->aSelectors, true);
42+
if ($iKey !== false) {
43+
unset($this->aSelectors[$iKey]);
44+
}
45+
}
46+
3947
/**
4048
* @deprecated use getSelectors()
4149
*/

0 commit comments

Comments
 (0)