Make WordPress Core


Ignore:
Timestamp:
09/28/2016 07:53:07 PM (9 years ago)
Author:
afercia
Message:

Administration: Improve the usage of the button CSS classes.

Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

  • Adds the button class to all primary buttons make them responsive
  • Removes all secondary-button classes and replaces it with button when needed. button-secondary shouldn't be used and exists just for backward compatibility reasons
  • Replaces classes inside submit_button() with a shorthand for some buttons, and use an empty string for the default button class. Passing button is unnecessary
  • Adjusts get_submit_button() to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/theme-install.php

    r38640 r38672  
    175175                <input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" />
    176176                <input type="search" id="wporg-username-input" value="<?php echo esc_attr( $user ); ?>" />
    177                 <input type="button" class="button button-secondary favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
     177                <input type="button" class="button favorites-form-submit" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
    178178            </p>
    179179        </div>
     
    263263            <# } #>
    264264            <# if ( data.customize_url ) { #>
    265                 <a class="button button-secondary load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
     265                <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a>
    266266            <# } else { #>
    267                 <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
     267                <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
    268268            <# } #>
    269269        <# } else { #>
     
    273273            ?>
    274274            <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>
    275             <button class="button-secondary preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
     275            <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button>
    276276        <# } #>
    277277    </div>
     
    326326            </div>
    327327            <div class="wp-full-overlay-footer">
    328                 <button type="button" class="collapse-sidebar button-secondary" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
     328                <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="<?php esc_attr_e( 'Collapse Sidebar' ); ?>">
    329329                    <span class="collapse-sidebar-arrow"></span>
    330330                    <span class="collapse-sidebar-label"><?php _e( 'Collapse' ); ?></span>
Note: See TracChangeset for help on using the changeset viewer.