Make WordPress Core


Ignore:
Timestamp:
06/30/2026 08:17:07 PM (4 months ago)
Author:
joedolson
Message:

Admin Reskin: Fix interactive control heights on mobile.

Give interactive elements a consistent 40px height in the admin mobile viewport on the Add Plugins, Media Library grid, Settings > General, and Add Themes screens.

Follow-up to [61645].
Reviewed by joedolson.
Merges [62516] to the 7.0 branch.

Props abcd95, wildworks.
Fixes #64999.

Location:
branches/7.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/7.0

  • branches/7.0/src/wp-admin/theme-install.php

    r62378 r62603  
    409409                                        <# if ( data.activate_url ) { #>
    410410                                                <# if ( ! data.active ) { #>
    411                                                         <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
     411                                                        <a class="button button-primary button-compact activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
    412412                                                <# } else { #>
    413                                                         <button class="button button-primary disabled"><?php _ex( 'Activated', 'theme' ); ?></button>
     413                                                        <button class="button button-primary button-compact disabled"><?php _ex( 'Activated', 'theme' ); ?></button>
    414414                                                <# } #>
    415415                                        <# } #>
    … …  
    417417                                                <# if ( ! data.active ) { #>
    418418                                                        <# if ( ! data.block_theme ) { #>
    419                                                                 <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
     419                                                                <a class="button button-compact load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
    420420                                                        <# } #>
    421421                                                <# } else { #>
    422                                                         <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Customize' ); ?></a>
     422                                                        <a class="button button-compact load-customize" href="{{ data.customize_url }}"><?php _e( 'Customize' ); ?></a>
    423423                                                <# } #>
    424424                                        <# } else { #>
    425                                                 <button class="button preview install-theme-preview"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
     425                                                <button class="button button-compact preview install-theme-preview"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
    426426                                        <# } #>
    427427                                <# } else { #>
    … …  
    431431                                        ?>
    432432                                        <# if ( data.activate_url ) { #>
    433                                                 <a class="button button-primary disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a>
     433                                                <a class="button button-primary button-compact disabled" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Activate', 'theme' ); ?></a>
    434434                                        <# } #>
    435435                                        <# if ( data.customize_url ) { #>
    436                                                 <a class="button disabled"><?php _e( 'Live Preview' ); ?></a>
     436                                                <a class="button button-compact disabled"><?php _e( 'Live Preview' ); ?></a>
    437437                                        <# } else { #>
    438                                                 <button class="button disabled"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
     438                                                <button class="button button-compact disabled"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
    439439                                        <# } #>
    440440                                <# } #>
    … …  
    445445                                        $aria_label = sprintf( _x( 'Install %s', 'theme' ), '{{ data.name }}' );
    446446                                        ?>
    447                                         <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>
    448                                         <button class="button preview install-theme-preview"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
     447                                        <a class="button button-primary button-compact 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>
     448                                        <button class="button button-compact preview install-theme-preview"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
    449449                                <# } else { #>
    450450                                        <?php
    … …  
    452452                                        $aria_label = sprintf( _x( 'Cannot Install %s', 'theme' ), '{{ data.name }}' );
    453453                                        ?>
    454                                         <a class="button button-primary disabled" data-name="{{ data.name }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Install', 'theme' ); ?></a>
    455                                         <button class="button disabled"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
     454                                        <a class="button button-primary button-compact disabled" data-name="{{ data.name }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Install', 'theme' ); ?></a>
     455                                        <button class="button button-compact disabled"><?php echo esc_html_x( 'Preview', 'verb' ); ?></button>
    456456                                <# } #>
    457457                        <# } #>
    … …  
    488488                                        ?>
    489489                                        <# if ( ! data.active ) { #>
    490                                                 <a class="button button-primary button-compact activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
     490                                                <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
    491491                                        <# } else { #>
    492                                                 <button class="button button-primary button-compact disabled"><?php _ex( 'Activated', 'theme' ); ?></button>
     492                                                <button class="button button-primary disabled"><?php _ex( 'Activated', 'theme' ); ?></button>
    493493                                        <# } #>
    494494                                <# } else { #>
    495                                         <a class="button button-primary button-compact disabled" ><?php _ex( 'Cannot Activate', 'theme' ); ?></a>
     495                                        <a class="button button-primary disabled" ><?php _ex( 'Cannot Activate', 'theme' ); ?></a>
    496496                                <# } #>
    497497                        <# } else { #>
    498498                                <# if ( data.compatible_wp && data.compatible_php ) { #>
    499                                         <a href="{{ data.install_url }}" class="button button-primary button-compact theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a>
     499                                        <a href="{{ data.install_url }}" class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}"><?php _e( 'Install' ); ?></a>
    500500                                <# } else { #>
    501                                         <a class="button button-primary button-compact disabled" ><?php _ex( 'Cannot Install', 'theme' ); ?></a>
     501                                        <a class="button button-primary disabled" ><?php _ex( 'Cannot Install', 'theme' ); ?></a>
    502502                                <# } #>
    503503                        <# } #>
Note: See TracChangeset for help on using the changeset viewer.