Render proper content width in template previews
[MAILPOET-6249]
This commit is contained in:
committed by
Jan Lysý
parent
801f586b00
commit
b6d75410cf
@ -41,6 +41,9 @@ class TemplatePreview {
|
||||
$editorTheme->merge(new WP_Theme_JSON($templateTheme, 'custom'));
|
||||
}
|
||||
$additionalCSS = file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'preview.css');
|
||||
// Set proper content width for previews
|
||||
$layoutSettings = $this->themeController->getLayoutSettings();
|
||||
$additionalCSS .= ".is-root-container { width: {$layoutSettings['contentSize']}; margin: 0 auto; }";
|
||||
return $editorTheme->get_stylesheet() . $additionalCSS;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user