API / Minn\Theme / FeatureSelectors

FeatureSelectors final class

Minn\Theme\FeatureSelectors · public/minn/src/Minn/Theme/FeatureSelectors.php · 33 lines

A block's styles split between the selectors its metadata gives its features (probe theme-json-css), in the metadata's order: a property with a selector of its own first, then what is left of its feature under the feature's selector. What is taken leaves the node.

Public

staticsplit(array $selectors, array $node): array#

The styles each feature selector takes, and the node left over.

$selectorsarray<string, mixed>the block's metadata selectors
$nodearray<string, mixed>the block's styles
@return array{0: list<array{0: string, 1: array<string, mixed>}>, 1: array<string, mixed>} the styles each selector takes, in order, and what stays