Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor
CssToAttributeConverter::mapCssToHtmlAttribute
Tries to apply the CSS style to $node as an attribute.
This method maps a CSS rule to HTML attributes and adds those to the node.
Method of the class: CssToAttributeConverter{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->mapCssToHtmlAttribute( $property, $value, $node ): void;
- $property(string) (required)
- the name of the CSS property to map.
- $value(string) (required)
- the value of the style rule to map.
- $node(DOMElement) (required)
- node to apply styles to.
CssToAttributeConverter::mapCssToHtmlAttribute() CssToAttributeConverter::mapCssToHtmlAttribute code WC 10.8.1
private function mapCssToHtmlAttribute(string $property, string $value, \DOMElement $node): void
{
if (!$this->mapSimpleCssProperty($property, $value, $node)) {
$this->mapComplexCssProperty($property, $value, $node);
}
}