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

Pullquote Block: In the Classic theme, line-height is not applied on the editor #49261

Open
t-hamano opened this issue Mar 22, 2023 · 1 comment
Labels
[Block] Pullquote Affects the Pullquote Block [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

The line-height is not applied to the body of the Pullquote block in the editor when the following conditions overlap:

  • Classic theme (without theme.json)
  • Gutenberg plugin is disabled, or Gutenberg plugin is enabled and the "Use theme styles" option is disabled

When this condition is met, line-height:1.8 is applied to the p tag and the value of the line-height control is not reflected.

classic_editor

This style is probably output from the following definition:

Step-by-step reproduction instructions

Use the following files to create a classic theme with line-height support enabled.

mytheme/function.php:

<?php
add_action( 'after_setup_theme', 'custom_setup_theme' );
function custom_setup_theme() {
	add_theme_support( 'custom-line-height' );
}

mytheme/index.php:

<?php
wp_head();
the_content();
wp_footer();

mytheme/style.css:

/*
Theme Name: My Theme
*/

Use the following code to insert a Pullquote block with all typographic styles applied:

<!-- wp:pullquote {"style":{"typography":{"fontSize":"24px","fontStyle":"normal","fontWeight":"700","letterSpacing":"5px","textDecoration":"line-through","textTransform":"uppercase","lineHeight":"4"}},"backgroundColor":"cyan-bluish-gray"} -->
<figure class="wp-block-pullquote has-cyan-bluish-gray-background-color has-background" style="font-size:24px;font-style:normal;font-weight:700;letter-spacing:5px;line-height:4;text-decoration:line-through;text-transform:uppercase"><blockquote><p>Hello World! Hello World! Hello World!<br>Hello World! <br>Hello World! Hello World! </p><cite>Citation. Citation. Citation. Citation.<br>Citation. Citation.<br>Citation. Citation. Citation. Citation.</cite></blockquote></figure>
<!-- /wp:pullquote -->

Screenshots, screen recording, code snippet

4c2a3d14de0c1b5af1d96d8e970d67ac.mp4

Environment info

  • WordPress Version: WordPress 6.2-RC3
  • Gutenberg Version: 15.3.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@t-hamano
Copy link
Contributor Author

Note: In #11610, it is being considered to deprecate the Pullquote block. If this block is deprecated, there will be no need to deal with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pullquote Affects the Pullquote Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants