Customizer: Hide the transport list when it's empty, especially for screen readers.
Also prevent invalid markup for `.customize-section-description`. Props valendesigns. Fixes #32843. git-svn-id: https://develop.svn.wordpress.org/trunk@33282 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8c36e7b3c4
commit
d9fcddae25
@ -227,6 +227,18 @@ body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
div.customize-section-description {
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
div.customize-section-description p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.customize-section-description p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#customize-theme-controls .customize-themes-panel h3.customize-section-title:first-child {
|
||||
border-bottom: 1px solid #ddd;
|
||||
padding: 12px 12px 12px 12px;
|
||||
|
@ -408,7 +408,6 @@
|
||||
.menu-item-depth-11 > .menu-item-bar { margin-right: 220px; }
|
||||
|
||||
/* Submenu left margin. */
|
||||
/* @todo menu-item-transport seems entirely unused. */
|
||||
.menu-item-depth-0 .menu-item-transport { margin-left: 0; }
|
||||
.menu-item-depth-1 .menu-item-transport { margin-left: -20px; }
|
||||
.menu-item-depth-3 .menu-item-transport { margin-left: -60px; }
|
||||
|
@ -531,6 +531,11 @@ li.menu-item.ui-sortable-helper .menu-item-transport .menu-item-bar {
|
||||
margin-top: 13px;
|
||||
}
|
||||
|
||||
/* Hide the transport list when it's empty */
|
||||
.menu-item .menu-item-transport:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* WARNING: The factor of 30px is hardcoded into the nav-menus JavaScript. */
|
||||
.menu-item-depth-0 { margin-left: 0px; }
|
||||
.menu-item-depth-1 { margin-left: 30px; }
|
||||
|
@ -363,7 +363,9 @@ class WP_Customize_Section {
|
||||
</h3>
|
||||
</div>
|
||||
<# if ( data.description ) { #>
|
||||
<p class="description customize-section-description">{{{ data.description }}}</p>
|
||||
<div class="description customize-section-description">
|
||||
{{{ data.description }}}
|
||||
</div>
|
||||
<# } #>
|
||||
</li>
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user