[wp-trac] [WordPress Trac] #33220: Customizer: layout issues with autofocus'd sections on small screens

WordPress Trac noreply at wordpress.org
Thu Aug 6 10:27:45 UTC 2015


#33220: Customizer: layout issues with autofocus'd sections on small screens
--------------------------+---------------------------
 Reporter:  mattwiebe     |       Owner:  valendesigns
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  4.3
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  ui
--------------------------+---------------------------

Comment (by valendesigns):

 So I've got a bit more information to share. It seems this issue only
 happen to panels or sections that come after a panel or section which is
 created dynamically through context and is not visible in time for the
 calculation so the parent UL has an incorrect negative margin by a factor
 of 42px for each hidden panel or section that came above it in the UI.

 I believe we need to create a callback that updates the parent UL's
 negative top margin right after the context inserts the dynamic items into
 the UI. Anyone have suggestions where to add that?

 Also, it would make sense for consistency to dynamically get the header
 actions height like we do in other place, instead of hardcoding `45`. So
 this:
 {{{
 content.css( 'margin-top', ( 45 - position - scroll ) );
 }}}
 Becomes this:
 {{{
 content.css( 'margin-top', ( $( '#customize-header-actions' ).height() -
 position - scroll ) );
 }}}

 As well, it seems like we could move that code into the `sizing` function
 instead of in the `expand` function. Thoughts?

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


More information about the wp-trac mailing list