Function EmToPx->selector_corresponds
Definitions
sources/css_cleanup.php
- Whether the $complex selector corresponds to the $simple selector.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$simple | string | No | No | required parameter | N/A | N/A | Simple selector |
$complex | string | No | No | required parameter | N/A | N/A | Complex selector |
$may_be_chained_by | array | No | No | [] | N/A | N/A | Possible prefixes to the simple selector to make the complex selector |
$just_element | boolean | No | No | False | N/A | N/A | Just check the element part of the selector, ignore any complex selector parts of it (like attribute selector) |
Returns
- Whether it corresponds
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Whether the $complex selector corresponds to the $simple selector.
*
* @param string $simple Simple selector
* @param string $complex Complex selector
* @param array $may_be_chained_by Possible prefixes to the simple selector to make the complex selector
* @param boolean $just_element Just check the element part of the selector, ignore any complex selector parts of it (like attribute selector)
* @return boolean Whether it corresponds
*/
protected function selector_corresponds(string $simple, string $complex, array $may_be_chained_by = [], bool $just_element = false) : bool
* Whether the $complex selector corresponds to the $simple selector.
*
* @param string $simple Simple selector
* @param string $complex Complex selector
* @param array $may_be_chained_by Possible prefixes to the simple selector to make the complex selector
* @param boolean $just_element Just check the element part of the selector, ignore any complex selector parts of it (like attribute selector)
* @return boolean Whether it corresponds
*/
protected function selector_corresponds(string $simple, string $complex, array $may_be_chained_by = [], bool $just_element = false) : bool