WordPress / twentytwentytwo

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
406 stars 91 forks source link

Navigation under the Comment Block is not cleared after floating #314

Closed alberto-marin closed 2 years ago

alberto-marin commented 2 years ago

Describe the bug When breaking the comments into pages, the comment navigation is missing CSS styles to clear those elements after float.

To Reproduce Steps to reproduce the behavior:

  1. Create a post and make a few comments, let's say 13 (why not?)
  2. Activate Break comments into pages under Settings -> Discussion. Set to an amount that will ensure the comment navigation to show.
  3. Visualise the post with the comments
  4. See CSS problem

Expected behavior Elements before and after the wp comment block containing the navigation should be cleared and avoid overlapping.

Screenshots

Current problem:

top-before bottom-before

Expectation:

top-after bottom-after

Device inphone:

Proposed solution

.wp-block-post-comments .navigation {
    margin-bottom: 1.4em;
}
.wp-block-post-comments .navigation:before, 
.wp-block-post-comments .navigation:after {
    content: '';
    display: table;
    clear: both;
}
kjellr commented 2 years ago

Thanks for flagging — I think this probably needs an issue in Gutenberg akin to the one created in response to https://github.com/WordPress/twentytwentytwo/issues/44: https://github.com/WordPress/gutenberg/pull/35958

kjellr commented 2 years ago

This has been reported upstream here: https://github.com/WordPress/gutenberg/issues/38188

Thanks again!