Make WordPress Core

Opened 3 years ago

Last modified 7 days ago

#56143 new defect (bug)

Twenty Nineteen: Separator block alignment issue

Reported by: umesh84's profile umesh84 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.0
Component: Bundled Theme Keywords: needs-design-feedback
Focuses: ui, css Cc:

Description (last modified by sabernhardt)

Twenty Nineteen Themes Separator Block select Default style not center aligned in editor and Front side

Steps to replicate:
1: Activate the Twenty Nineteen Theme
2: add Separator block
3: Select Default style

I have given the video link of the issue below.
https://www.loom.com/share/7f80bd907043491fbe8c28d30dd4cc1a

Attachments (1)

#56143.patch (443 bytes) - added by kajalgohel 3 years ago.
patch added

Download all attachments as: .zip

Change History (10)

@kajalgohel
3 years ago

patch added

#1 @kajalgohel
3 years ago

  • Keywords has-patch added; needs-patch removed

#2 @SergeyBiryukov
3 years ago

  • Summary changed from Themes Twenty Nineteen separator block alignment issue to Twenty Nineteen: Separator block alignment issue

#3 @sabernhardt
3 years ago

  • Description modified (diff)
  • Keywords needs-patch added; has-patch removed
  • Version changed from 6.0 to 5.0

I think aligning the separator line to the side by default is appropriate in Twenty Nineteen because headings have a similar line on the side.

However, if you purposely set it to align center, that does not work at 768 pixels and wider:

@media only screen and (min-width: 768px) {
  .entry .entry-content > *.aligncenter,
  .entry .entry-summary > *.aligncenter,
  .entry .entry-summary > .wp-block-group > .wp-block-group__inner-container > *.aligncenter,
  .entry .entry-content > .wp-block-group > .wp-block-group__inner-container > *.aligncenter {
    margin-left: 0;
    margin-right: 0;
  }
}

The side margins were set to zero before the theme was widely available.

#4 @karmatosed
9 months ago

  • Keywords has-patch added; needs-patch removed

#5 @poena
7 days ago

  • Severity changed from minor to normal

The CSS above affects more blocks than the separator.

The image block is not affected because it has CSS to counter it.
The text blocks are not affected because they use has-text-align-center not aligncenter.

Weighing "unexpected changes on live websites" against "keeping broken settings", I think it would be better if the center alignment option worked.

#6 @poena
7 days ago

I agree that by default the separator can remain on the side.

#8 @poena
7 days ago

There are some other blocks that also have additional CSS to counter this style:

.wp-block[data-align="center"] > .wp-block-archives,
.wp-block[data-align="center"] > .wp-block-categories {
	text-align: center;
}

And the site logo is positioned by the default WP block style

.wp-block-site-logo.aligncenter {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

Example blocks for testing:

<!-- wp:table {"align":"center"} -->
<figure class="wp-block-table aligncenter"><table class="has-fixed-layout"><tbody><tr><td>ghfghfg</td><td>sdgsdgs</td></tr><tr><td>gsdgsdg</td><td>sdgsd</td></tr></tbody></table></figure>
<!-- /wp:table -->

<!-- wp:gallery {"linkTo":"none","align":"center"} -->
<figure class="wp-block-gallery aligncenter has-nested-images columns-default is-cropped"><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img/></figure>
<!-- /wp:image -->

<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img/></figure>
<!-- /wp:image -->

<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img/></figure>
<!-- /wp:image --></figure>
<!-- /wp:gallery -->

<!-- wp:post-featured-image {"align":"center"} /-->

<!-- wp:audio {"id":70,"align":"center"} -->
<figure class="wp-block-audio aligncenter"><audio controls src=""></audio></figure>
<!-- /wp:audio -->

<!-- wp:cover {"dimRatio":50,"isUserOverlayColor":false,"isDark":false,"sizeSlug":"full","align":"center","layout":{"type":"constrained"}} -->
<div class="wp-block-cover aligncenter is-light"><span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:paragraph {"align":"center","placeholder":"Write title…","fontSize":"large"} -->
<p class="has-text-align-center has-large-font-size"></p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:cover -->

<!-- wp:video {"align":"center"} -->
<figure class="wp-block-video aligncenter"></figure>
<!-- /wp:video -->

<!-- wp:separator {"align":"center"} -->
<hr class="wp-block-separator aligncenter has-alpha-channel-opacity"/>
<!-- /wp:separator -->

<!-- wp:archives {"displayAsDropdown":true,"showPostCounts":true,"align":"center"} /-->

<!-- wp:archives {"showLabel":false,"align":"center"} /-->

<!-- wp:calendar {"align":"center"} /-->

<!-- wp:categories {"taxonomy":"post_tag","align":"center"} /-->

<!-- wp:categories {"align":"center"} /-->

<!-- wp:latest-comments {"align":"center"} /-->

<!-- wp:latest-posts {"align":"center"} /-->

<!-- wp:search {"label":"Search","buttonText":"Search","align":"center"} /-->

<!-- wp:site-logo {"align":"center"} /-->

<!-- wp:avatar {"align":"center"} /-->
Last edited 7 days ago by poena (previous) (diff)

#9 @poena
7 days ago

  • Keywords has-patch removed
Note: See TracTickets for help on using tickets.