Customize: Fix alignment of Customize, Activate, and Live Preview buttons appearing on the Themes admin screen.

Amends [41893].
Props Mahvash-Fatima.
See #42215.
Fixes #42275.

Built from https://develop.svn.wordpress.org/trunk@41949


git-svn-id: http://core.svn.wordpress.org/trunk@41783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-10-19 18:10:47 +00:00
parent d695648084
commit c8105f1460
11 changed files with 154 additions and 100 deletions

View File

@ -1675,6 +1675,12 @@ p.customize-section-description {
margin-left: 12px;
}
.theme-browser .theme.active .theme-actions,
.wp-customizer .theme-browser .theme .theme-actions {
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
@media screen and ( max-width: 640px ) {
.customize-section-description-container + #customize-control-custom_css:last-child {
margin-left: 0;
@ -2098,21 +2104,6 @@ p.customize-section-description {
font-size: 15px;
}
.theme-id-container {
position: relative;
}
.theme-browser .theme.active .theme-actions,
.wp-customizer .theme-browser .theme .theme-actions {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
left: 0;
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
#customize-controls .theme-overlay .theme-name {
font-size: 32px;
}
@ -3042,3 +3033,11 @@ body.adding-widget .add-new-widget:before,
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
}
@media screen and ( max-width: 600px ) {
.theme-browser .theme.active .theme-actions,
.wp-customizer .theme-browser .theme .theme-actions {
padding: 8px 15px;
box-shadow: none;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1675,6 +1675,12 @@ p.customize-section-description {
margin-right: 12px;
}
.theme-browser .theme.active .theme-actions,
.wp-customizer .theme-browser .theme .theme-actions {
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
@media screen and ( max-width: 640px ) {
.customize-section-description-container + #customize-control-custom_css:last-child {
margin-right: 0;
@ -2098,21 +2104,6 @@ p.customize-section-description {
font-size: 15px;
}
.theme-id-container {
position: relative;
}
.theme-browser .theme.active .theme-actions,
.wp-customizer .theme-browser .theme .theme-actions {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
right: 0;
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
#customize-controls .theme-overlay .theme-name {
font-size: 32px;
}
@ -3042,3 +3033,11 @@ body.adding-widget .add-new-widget:before,
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
}
@media screen and ( max-width: 600px ) {
.theme-browser .theme.active .theme-actions,
.wp-customizer .theme-browser .theme .theme-actions {
padding: 8px 15px;
box-shadow: none;
}
}

File diff suppressed because one or more lines are too long

View File

@ -222,6 +222,21 @@ body.js .theme-browser.search-loading {
opacity: 1;
}
.theme-id-container {
position: relative;
}
.theme-browser .theme.active .theme-actions,
.theme-browser .theme .theme-actions {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
left: 0;
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
.theme-browser .theme.active .theme-actions .button-primary {
margin-left: 0;
}
@ -1892,6 +1907,16 @@ body.full-overlay-active {
margin-top: 6px;
line-height: normal;
}
.theme-browser .theme .theme-actions .button {
margin-bottom: 0;
}
.theme-browser .theme.active .theme-actions,
.theme-browser .theme .theme-actions {
padding-top: 8px;
padding-bottom: 8px;
}
}
@media aural {

File diff suppressed because one or more lines are too long

View File

@ -222,6 +222,21 @@ body.js .theme-browser.search-loading {
opacity: 1;
}
.theme-id-container {
position: relative;
}
.theme-browser .theme.active .theme-actions,
.theme-browser .theme .theme-actions {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
right: 0;
padding: 10px 15px;
box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
}
.theme-browser .theme.active .theme-actions .button-primary {
margin-right: 0;
}
@ -1892,6 +1907,16 @@ body.full-overlay-active {
margin-top: 6px;
line-height: normal;
}
.theme-browser .theme .theme-actions .button {
margin-bottom: 0;
}
.theme-browser .theme.active .theme-actions,
.theme-browser .theme .theme-actions {
padding-top: 8px;
padding-bottom: 8px;
}
}
@media aural {

File diff suppressed because one or more lines are too long

View File

@ -264,30 +264,33 @@ if ( $tab ) {
printf( __( 'By %s' ), '{{ data.author }}' );
?>
</div>
<h3 class="theme-name">{{ data.name }}</h3>
<div class="theme-actions">
<# if ( data.installed ) { #>
<?php
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<# if ( data.activate_url ) { #>
<a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<# } #>
<# if ( data.customize_url ) { #>
<a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
<div class="theme-id-container">
<h3 class="theme-name">{{ data.name }}</h3>
<div class="theme-actions">
<# if ( data.installed ) { #>
<?php
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<# if ( data.activate_url ) { #>
<a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<# } #>
<# if ( data.customize_url ) { #>
<a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
<# } else { #>
<button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
<# } #>
<# } else { #>
<?php
/* translators: %s: Theme name */
$aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
?>
<a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
<button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
<# } #>
<# } else { #>
<?php
/* translators: %s: Theme name */
$aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
?>
<a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
<button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
<# } #>
</div>
</div>
<# if ( data.installed ) { #>

View File

@ -273,34 +273,35 @@ foreach ( $themes as $theme ) :
<span class="more-details" id="<?php echo $aria_action; ?>"><?php _e( 'Theme Details' ); ?></span>
<div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div>
<?php if ( $theme['active'] ) { ?>
<h2 class="theme-name" id="<?php echo $aria_name; ?>">
<div class="theme-id-container">
<?php if ( $theme['active'] ) { ?>
<h2 class="theme-name" id="<?php echo $aria_name; ?>">
<?php
/* translators: %s: theme name */
printf( __( '<span>Active:</span> %s' ), $theme['name'] );
?>
</h2>
<?php } else { ?>
<h2 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h2>
<?php } ?>
<div class="theme-actions">
<?php if ( $theme['active'] ) { ?>
<?php if ( $theme['actions']['customize'] && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
<a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a>
<?php } ?>
<?php } else { ?>
<?php
/* translators: %s: theme name */
printf( __( '<span>Active:</span> %s' ), $theme['name'] );
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
</h2>
<?php } else { ?>
<h2 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h2>
<?php } ?>
<div class="theme-actions">
<?php if ( $theme['active'] ) { ?>
<?php if ( $theme['actions']['customize'] && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
<a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a>
<a class="button activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a>
<?php } ?>
<?php } ?>
<?php } else { ?>
<?php
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<a class="button activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
<a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a>
<?php } ?>
<?php } ?>
</div>
</div>
</div>
<?php endforeach; ?>
@ -407,30 +408,32 @@ $can_install = current_user_can( 'install_themes' );
?>
</div>
<# if ( data.active ) { #>
<h2 class="theme-name" id="{{ data.id }}-name">
<?php
/* translators: %s: Theme name */
printf( __( '<span>Active:</span> %s' ), '{{{ data.name }}}' );
?>
</h2>
<# } else { #>
<h2 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h2>
<# } #>
<div class="theme-actions">
<div class="theme-id-container">
<# if ( data.active ) { #>
<# if ( data.actions.customize ) { #>
<a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a>
<# } #>
<h2 class="theme-name" id="{{ data.id }}-name">
<?php
/* translators: %s: Theme name */
printf( __( '<span>Active:</span> %s' ), '{{{ data.name }}}' );
?>
</h2>
<# } else { #>
<?php
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
<a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
<h2 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h2>
<# } #>
<div class="theme-actions">
<# if ( data.active ) { #>
<# if ( data.actions.customize ) { #>
<a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a>
<# } #>
<# } else { #>
<?php
/* translators: %s: Theme name */
$aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?>
<a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
<a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
<# } #>
</div>
</div>
</script>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta3-41948';
$wp_version = '4.9-beta3-41949';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.