Customize: Fix alignment of natural-width media buttons in site icon control.

Amends [40653].
Props afercia.
Fixes #40220.


git-svn-id: https://develop.svn.wordpress.org/trunk@40671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-05-15 18:50:50 +00:00
parent 6ae69be3a8
commit b2ea5a2b11
4 changed files with 8 additions and 7 deletions

View File

@ -710,12 +710,18 @@ p.customize-section-description {
padding-top: 7px;
}
/* Remove descender space. */
.customize-control .thumbnail-image,
.customize-control-header .current,
.customize-control .wp-media-wrapper.wp-video {
line-height: 0;
}
/* Remove descender space. */
.customize-control-site_icon .favicon-preview .browser-preview {
vertical-align: top;
}
.customize-control .thumbnail-image img {
cursor: pointer;
}

View File

@ -204,8 +204,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
<div class="actions">
<?php if ( current_user_can( 'upload_files' ) ): ?>
<button type="button"<?php echo $visibility; ?> class="button remove" aria-label="<?php esc_attr_e( 'Hide header image' ); ?>"><?php _e( 'Hide image' ); ?></button>
<button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add new header image' ); ?>"><?php _e( 'Add new image' ); ?></button>
<div style="clear:both"></div>
<button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add new header image' ); ?>"><?php _e( 'Add new image' ); ?></button>
<?php endif; ?>
</div>
<div class="choices">

View File

@ -192,7 +192,6 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
<# if ( data.canUpload ) { #>
<button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
<button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
<div style="clear:both"></div>
<# } #>
</div>
</div>
@ -208,7 +207,6 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
<# if ( data.canUpload ) { #>
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.select }}</button>
<# } #>
<div style="clear:both"></div>
</div>
</div>
<# } #>

View File

@ -62,7 +62,7 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<# if ( data.attachment && data.attachment.id ) { #>
<div class="attachment-media-view">
<# if ( data.attachment.sizes ) { #>
<div class="site-icon-preview">
<div class="site-icon-preview wp-clearfix">
<div class="favicon-preview">
<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt="" />
@ -78,7 +78,6 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<# if ( data.canUpload ) { #>
<button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>
<div style="clear:both"></div>
<# } #>
</div>
</div>
@ -94,7 +93,6 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<# if ( data.canUpload ) { #>
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>
<# } #>
<div style="clear:both"></div>
</div>
</div>
<# } #>