WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 7 weeks ago

#52816 closed defect (bug) (fixed)

Post metabox style Twenty Seventeen has a border

Reported by: joseeyoast Owned by: SergeyBiryukov
Milestone: 5.7.1 Priority: normal
Severity: normal Version: 5.7
Component: Bundled Theme Keywords: has-patch commit fixed-major
Focuses: ui, css Cc:

Description

In Twenty Seventeen the post metabox/editor styling looks incorrect, it has a border between them. It looks fine in Twenty Twenty-One.

Attachments (5)

Start writing or type to choose a block.png (55.2 KB) - added by joseeyoast 2 months ago.
Twenty Seventeen post metabox
Start writing or type to choose a block (1).png (58.6 KB) - added by joseeyoast 2 months ago.
Twenty Twenty-One post metabox
52816.diff (508 bytes) - added by audrasjb 2 months ago.
Twenty Seventeen: Remove extra space around post editor.
Capture d’écran 2021-03-15 à 13.49.15.png (217.3 KB) - added by audrasjb 2 months ago.
Before patch
Capture d’écran 2021-03-15 à 13.53.11.png (170.3 KB) - added by audrasjb 2 months ago.
After 52816.diff

Download all attachments as: .zip

Change History (12)

@joseeyoast
2 months ago

Twenty Seventeen post metabox

@joseeyoast
2 months ago

Twenty Twenty-One post metabox

#1 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 5.7.1

Hi there, welcome to WordPress Trac! Thanks for the report.

A similar issue was fixed in [50465] / #52646 for Twenty Fifteen and Twenty Sixteen. But it looks like Twenty Seventeen was missed in testing, I don't see it mentioned in comment:4:ticket:52646.

Moving to 5.7.1 to apply the fix to Twenty Seventeen as well.

Last edited 2 months ago by SergeyBiryukov (previous) (diff)

@audrasjb
2 months ago

Twenty Seventeen: Remove extra space around post editor.

#2 @audrasjb
2 months ago

Step to reproduce the issue:

  • Install Twenty Seventeen
  • Add the following code to the theme’s functions.php file
  • Go the post editor
function wporg_add_custom_box() {
    $screens = [ 'post', 'wporg_cpt' ];
    foreach ( $screens as $screen ) {
        add_meta_box(
            'wporg_box_id',                 // Unique ID
            'Custom Meta Box Title',      // Box title
            'wporg_custom_box_html',  // Content callback, must be of type callable
            $screen                            // Post type
        );
    }
}
add_action( 'add_meta_boxes', 'wporg_add_custom_box' );

function wporg_custom_box_html( $post ) {
    ?>
    <p>
        <label for="wporg_field">Description for this field</label><br />
	<input type="text" value="My value" />
    </p>
    <?php
}
Version 0, edited 2 months ago by audrasjb (next)

#3 @audrasjb
2 months ago

  • Keywords has-patch commit added

#4 @SergeyBiryukov
2 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 50534:

Twenty Seventeen: Remove extra space around post editor.

The editor uses the full height of its container, so the added margins cause the visual editor to break out of the container. This removes the top & bottom margins, and makes the left & right margins consistent with the meta box area.

Follow-up to [50465].

Props joseeyoast, audrasjb.
Fixes #52816.

#5 @SergeyBiryukov
2 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backporting to the 5.7 branch.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


7 weeks ago

#7 @peterwilsoncc
7 weeks ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 50588:

Twenty Seventeen: Remove extra space around post editor.

The editor uses the full height of its container, so the added margins cause the visual editor to break out of the container. This removes the top & bottom margins, and makes the left & right margins consistent with the meta box area.

Follow-up to [50465].

Props joseeyoast, audrasjb, SergeyBiryukov.
Merges [50534] to the 5.7 branch.
Fixes #52816.

Note: See TracTickets for help on using tickets.