Automattic\WooCommerce\Vendor\Sabberworm\CSS\CSSList
Document::getSelectorsBySpecificity
Returns all Selector objects with the requested specificity found recursively in the tree.
Note that this does not yield the full DeclarationBlock that the selector belongs to (and, currently, there is no way to get to that).
Method of the class: Document{}
No Hooks.
Returns
Array
Usage
$Document = new Document(); $Document->getSelectorsBySpecificity( $sSpecificitySearch );
- $sSpecificitySearch(string|null)
- An optional filter by specificity. May contain a comparison operator and a number or just a number (defaults to "==").
Default:null
Document::getSelectorsBySpecificity() Document::getSelectorsBySpecificity code WC 10.5.0
public function getSelectorsBySpecificity($sSpecificitySearch = null)
{
/** @var array<int, Selector> $aResult */
$aResult = [];
$this->allSelectors($aResult, $sSpecificitySearch);
return $aResult;
}