WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.48k stars 4.18k forks source link

Latest Post block having spacing issue when we change post content from "Excerpt" to "Full Post" #66412

Open viralsampat-multidots opened 3 days ago

viralsampat-multidots commented 3 days ago

Description

Hell Team,

I have checked "Latest Post" block and found that there is some spacing issues between "Block Post Title" & "Block Post Content" when we change post content from "Excerpt" to "Full Post". There should some space between post title & post content.

I have checked this into various themes and here I have provided its screenshots.

Thanks,

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

Screenshots:

Twenty Fourteen:

Image Image

Twenty Fifteen

Image Image

Twenty Sixteen

Image Image

Twenty Seventeen

Image Image

Environment info

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

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

Please confirm which theme type you used for testing.

PARTHVATALIYA commented 2 days ago

Hello @viralsampat-multidots, @ndiego , I suggest adding the same CSS to the .wp-block-latest-posts__post-full-content class as we have in the .wp-block-latest-posts__post-excerpt class. This should add consistent spacing between the post title and post content in the latest posts block. I’ve added a diff to resolve this issue; please review it, and if it looks good, I’ll proceed with raising a PR.

diff --git a/packages/block-library/src/latest-posts/style.scss b/packages/block-library/src/latest-posts/style.scss
index 2a01d177ef..e7e90589c1 100644
--- a/packages/block-library/src/latest-posts/style.scss
+++ b/packages/block-library/src/latest-posts/style.scss
@@ -57,7 +57,7 @@
    font-size: 0.8125em;
 }

-.wp-block-latest-posts__post-excerpt {
+.wp-block-latest-posts__post-excerpt, .wp-block-latest-posts__post-full-content {
    margin-top: 0.5em;
    margin-bottom: 1em;
 }
viralsampat-multidots commented 2 days ago

Hello @ndiego

I have checked above mentioned changes and it looks good. Do you want to add PR or I will make this change and create new PR?

Thanks,

viralsampat-multidots commented 2 days ago

Hello @ndiego

I have updated my PR and made above mentioned change.

Thanks,

ndiego commented 2 days ago

@viralsampat-multidots can you provide a link to your PR, or link it to this issue?

viralsampat-multidots commented 2 days ago

Hello @ndiego

Yes, sure.

Here, I have provided my PR link: https://github.com/WordPress/gutenberg/pull/66442

Thanks,