Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Editor html typography #592

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions inc/class-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,6 @@ public function enqueue_editor_scripts() {
$html_typography = self::get_css( 'core', 'html' );

if ( $html_typography ) {
/**
* We don't want to apply our `html` `font-size` to the `<html>` element in the editor,
* or it will apply to text everywhere, including the inspector controls.
*/
$desktop_css = str_replace( 'html', '.is-desktop-preview', $html_typography );

wp_add_inline_style(
/**
* `wp-edit-blocks` is enqueued in the editor, including the iframes.
Expand All @@ -391,9 +385,7 @@ public function enqueue_editor_scripts() {
* Related: https://github.com/tomusborne/generatepress/issues/472
*/
'wp-edit-blocks',
// We add `$desktop_css` to apply to the `.is-desktop-preview` element on desktop and
// then we add `$html_typography` to apply to the `<html>` element in the device previews.
$desktop_css . $html_typography
$html_typography
);
}
}
Expand Down