Inline style declaration from font-size classes
This is needed for cases where we don't touch the HTML output to insert font size from the preprocessor (e.g., list item) [MAILPOET-5740]
This commit is contained in:
committed by
Jan Lysý
parent
daf2d9f854
commit
0e04a892c2
@@ -191,12 +191,17 @@ class SettingsController {
|
||||
}
|
||||
|
||||
public function getStylesheetForRendering(): string {
|
||||
$settings = $this->getTheme()->get_settings();
|
||||
$coreThemeSettings = \WP_Theme_JSON_Resolver::get_core_data()->get_settings();
|
||||
$emailThemeSettings = $this->getTheme()->get_settings();
|
||||
$css = '';
|
||||
// Font family classes
|
||||
foreach ($settings['typography']['fontFamilies']['theme'] as $fontFamily) {
|
||||
foreach ($emailThemeSettings['typography']['fontFamilies']['theme'] as $fontFamily) {
|
||||
$css .= ".has-{$fontFamily['slug']}-font-family { font-family: {$fontFamily['fontFamily']}; } \n";
|
||||
}
|
||||
// Font size classes
|
||||
foreach ($coreThemeSettings['typography']['fontSizes']['default'] as $fontSize) {
|
||||
$css .= ".has-{$fontSize['slug']}-font-size { font-size: {$fontSize['size']}; } \n";
|
||||
}
|
||||
return $css;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user