Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor
CssToAttributeConverter::mapBorderProperty
Method of the class: CssToAttributeConverter{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->mapBorderProperty( $node, $value ): void;
- $node(DOMElement) (required)
- node to apply styles to.
- $value(string) (required)
- the value of the style rule to map.
CssToAttributeConverter::mapBorderProperty() CssToAttributeConverter::mapBorderProperty code WC 10.4.3
private function mapBorderProperty(\DOMElement $node, string $value): void
{
if (!$this->isTableOrImageNode($node)) {
return;
}
if ($value === 'none' || $value === '0') {
$node->setAttribute('border', '0');
}
}