[wp-trac] [WordPress Trac] #35947: Customizer panel fails to fully expand leaving extra margin

WordPress Trac noreply at wordpress.org
Fri Mar 4 06:11:36 UTC 2016


#35947: Customizer panel fails to fully expand leaving extra margin
--------------------------+-----------------------
 Reporter:  tronoxas      |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  4.5
Component:  Customize     |     Version:  4.4.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by ryankienstra):

 * keywords:  needs-patch => has-patch


Comment:

 '''Proposed Patch'''

 @westonruter
 This [https://core.trac.wordpress.org/attachment/ticket/35947/200b49.diff
 patch] and identical [https://github.com/xwp/wordpress-develop/pull/145
 pull request] remove extra space at the bottom of an active Customizer
 panel. As this ticket notes, there's "unnecessary spacing when you go
 inside a panel."

 This occurs when there are many panels, using the code provided in this
 ticket to produce the panels. The non-active sections and panels still
 occupied space in the DOM. So the active panel had a `margin-top` property
 to move it to the top.

 This PR [https://github.com/xwp/wordpress-
 develop/compare/master...trac-35947#diff-
 6bdd5041777c50e624f1d0beae2e0b7cR437 sets] the height of the non-active
 sections to `0`. And it [https://github.com/xwp/wordpress-
 develop/compare/master...trac-35947#diff-
 58dfe22165ffd9650354f7bdd51002ecL1366 doesn't add] a `margin-top` value to
 the active panel's content.

 I tested this
 [https://core.trac.wordpress.org/attachment/ticket/35947/200b49.diff
 patch] with the `functions.php` code from this ticket on the following
 themes:

 [https://wordpress.org/themes/customizr Customizr] ,
 [https://wordpress.org/themes/graphene/ Graphene] ,
 [https://wordpress.org/themes/hueman/ Heuman] ,
 [https://wordpress.org/themes/twentyfifteen Twenty Fifteen] ,
 [https://wordpress.org/themes/twentysixteen Twenty Sixteen]

 There was no longer a space at the bottom of the panels. I couldn't find
 any side-effects. But this would definitely need to be tested more.

 This [https://core.trac.wordpress.org/attachment/ticket/35947/200b49.diff
 patch] may need to be reverted when
 [https://core.trac.wordpress.org/ticket/34391 trac-34391] is complete. It
 looks like [https://core.trac.wordpress.org/ticket/34391 trac-34391]
 provides a more long-term solution to this `margin-top` issue.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35947#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list