Add definition of default heading font-sizes and renderer support

Initially, I tried to place the definition to theme.json
(It could set it in styles.block.core/heading or styles.elements.h1...)
It was not possible to use theme.json because of the fluid typography
feature which, when enabled for a site, causes font sizes to being
converted to the fluid definition (clamp(x, y, z)) and which
is not usable for an email due to very little client support.

We need to make some changes in Gutenberg to be able to disable the feature.
Currently, the code for generating font sizes in CSS generated from the theme.json
looks directly at the global settings of the site.
[MAILPOET-5740]
This commit is contained in:
Rostislav Wolny
2024-01-19 12:08:39 +01:00
committed by Jan Lysý
parent 6f3ebc10b8
commit b90a35d80a
6 changed files with 82 additions and 18 deletions

View File

@ -70,6 +70,8 @@ class SettingsController {
['css' => $flexEmailLayoutStyles],
];
$settings['styles'] = apply_filters('mailpoet_email_editor_editor_styles', $settings['styles']);
$settings['__experimentalFeatures'] = $themeSettings;
// Enable border radius, color, style and width where possible
$settings['__experimentalFeatures']['border'] = [