Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#52816 closed defect (bug) (fixed)

Post metabox style Twenty Seventeen has a border

Reported by: joseeyoast's profile joseeyoast Owned by: sergeybiryukov's profile 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 4 years ago.
Twenty Seventeen post metabox
Start writing or type to choose a block (1).png (58.6 KB) - added by joseeyoast 4 years ago.
Twenty Twenty-One post metabox
52816.diff (508 bytes) - added by audrasjb 4 years 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 4 years ago.
Before patch
Capture d’écran 2021-03-15 à 13.53.11.png (170.3 KB) - added by audrasjb 4 years ago.
After 52816.diff

Download all attachments as: .zip

Change History (12)

@joseeyoast
4 years ago

Twenty Seventeen post metabox

@joseeyoast
4 years ago

Twenty Twenty-One post metabox

#1 @SergeyBiryukov
4 years 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 4 years ago by SergeyBiryukov (previous) (diff)

@audrasjb
4 years ago

Twenty Seventeen: Remove extra space around post editor.

#2 @audrasjb
4 years 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',
            'Custom Meta Box Title',
            'wporg_custom_box_html',
            $screen
        );
    }
}
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
}
Last edited 4 years ago by audrasjb (previous) (diff)

#3 @audrasjb
4 years ago

  • Keywords has-patch commit added

#4 @SergeyBiryukov
4 years 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
4 years 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.


4 years ago

#7 @peterwilsoncc
4 years 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.