Support

Account

Home Forums Bug Reports Editor's metabox margin top/bottom

Solving

Editor's metabox margin top/bottom

  • WP v 4.2.2 defines the margin for the metaboxes with margin at the bottom (e.g. featured image’s), but ACF pro 5.2.7 defines margin at the top on the “after-title” fields, so there’s no margin when you get a ACF’s metabox after a WP’s, (i.e. in my case when you switch the post edit admin page to 1 column instead of two)

    So the line 741 of acf-global should change from

    #acf_after_title-sortables .acf-postbox {
      margin: 20px 0 0;
    }

    to

    #acf_after_title-sortables .acf-postbox {
      margin: 0 0 20px 0;
    }
    div#acf_after_title-sortables .acf-postbox:first-child {
      margin-top: 20px;
    }
    

    Coming after the title should not reverse a metabox’s margin, but only add an EXTRA top margin, and ONLY to the first-child of the group, since it doesn’t matter if many fields are defined as “after-title” because only one will actually be after the title (the first-child).

    It looks like all the groups will appear inside the same #acf_after_title_sortables DIV (AFAIS), so there’s only gonna be ONE .postbox:first-child.

  • I will bring this to the developer’s attention.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Editor's metabox margin top/bottom’ is closed to new replies.