Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor

CssToAttributeConverter::mapComplexCssProperty │ private │ WC 1.0

Maps CSS properties that need special transformation to an HTML attribute.

Метод класса: CssToAttributeConverter{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->mapComplexCssProperty( $property, $value, $node ): void;
$property(строка) (обязательный)
the name of the CSS property to map.
$value(строка) (обязательный)
the value of the style rule to map.
$node(DOMElement) (обязательный)
node to apply styles to.

Код CssToAttributeConverter::mapComplexCssProperty() WC 11.2.1

private function mapComplexCssProperty(string $property, string $value, \DOMElement $node): void
{
    switch ($property) {
        case 'background':
            $this->mapBackgroundProperty($node, $value);
            break;
        case 'width':
            // intentional fall-through
        case 'height':
            $this->mapWidthOrHeightProperty($node, $value, $property);
            break;
        case 'margin':
            $this->mapMarginProperty($node, $value);
            break;
        case 'border':
            $this->mapBorderProperty($node, $value);
            break;
        default:
    }
}