Automattic\WooCommerce\EmailEditor\Engine

Settings_Controller::get_layout_width_without_paddingpublicWC 1.0

Returns the width of the layout without padding.

Method of the class: Settings_Controller{}

No Hooks.

Returns

String.

Usage

$Settings_Controller = new Settings_Controller();
$Settings_Controller->get_layout_width_without_padding(): string;

Settings_Controller::get_layout_width_without_padding() code WC 10.5.0

public function get_layout_width_without_padding(): string {
	$styles = $this->get_email_styles();
	$layout = $this->get_layout();
	$width  = $this->parse_number_from_string_with_pixels( $layout['contentSize'] );
	$width -= $this->parse_number_from_string_with_pixels( $styles['spacing']['padding']['left'] );
	$width -= $this->parse_number_from_string_with_pixels( $styles['spacing']['padding']['right'] );
	return "{$width}px";
}