WordPress at a glance
function is not described

Pelago\Emogrifier\Utilities

CssConcatenator::append() public WC 1.0

Appends a declaration block to the CSS.

{} It's a method of the class: CssConcatenator{}

No Hooks.

Return

null. Nothing.

Usage

$CssConcatenator = new CssConcatenator();
$CssConcatenator->append( $selectors, $declarationsBlock, $media );
$selectors(array) (required)
Array of selectors for the rule, e.g. ["ul", "ol", "p:first-child"].
$declarationsBlock(string) (required)
The property declarations, e.g. "margin-top: 0.5em; padding: 0".
$media(string)
The media query for the rule, e.g. "@media screen and (max-width:639px)", or an empty string if none.

Code of CssConcatenator::append() WC 5.4.1

<?php
public function append(array $selectors, $declarationsBlock, $media = '')
{
    $selectorsAsKeys = \array_flip($selectors);

    $mediaRule = $this->getOrCreateMediaRuleToAppendTo($media);
    $lastRuleBlock = \end($mediaRule->ruleBlocks);

    $hasSameDeclarationsAsLastRule = $lastRuleBlock !== false
        && $declarationsBlock === $lastRuleBlock->declarationsBlock;
    if ($hasSameDeclarationsAsLastRule) {
        $lastRuleBlock->selectorsAsKeys += $selectorsAsKeys;
    } else {
        $hasSameSelectorsAsLastRule = $lastRuleBlock !== false
            && self::hasEquivalentSelectors($selectorsAsKeys, $lastRuleBlock->selectorsAsKeys);
        if ($hasSameSelectorsAsLastRule) {
            $lastDeclarationsBlockWithoutSemicolon = \rtrim(\rtrim($lastRuleBlock->declarationsBlock), ';');
            $lastRuleBlock->declarationsBlock = $lastDeclarationsBlockWithoutSemicolon . ';' . $declarationsBlock;
        } else {
            $mediaRule->ruleBlocks[] = (object)\compact('selectorsAsKeys', 'declarationsBlock');
        }
    }
}