WordPress.org

Make WordPress Core

Changeset 27970


Ignore:
Timestamp:
04/06/2014 07:27:40 PM (4 years ago)
Author:
ocean90
Message:

Header images: Improve accessibility of Randomize buttons.

props ehg.
see #27598, #21785.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/customize-controls.css

    r27954 r27970  
    470470}
    471471
    472 #customize-control-header_image .uploaded button,
    473 #customize-control-header_image .default button {
     472#customize-control-header_image .uploaded button:not(.random),
     473#customize-control-header_image .default button:not(.random) {
    474474    width: 100%;
    475475    padding: 0;
     
    479479    color: inherit;
    480480    cursor: pointer;
    481     outline: none;
    482481}
    483482
     
    585584}
    586585
    587 #customize-control-header_image .random .inner {
    588     display: block;
    589 }
    590 
    591 #customize-control-header_image .placeholder:hover .dice {
     586#customize-control-header_image button.random {
     587    width: 100%;
     588    height: 40px;
     589}
     590
     591#customize-control-header_image button.random .dice {
     592    margin-top: 4px;
     593}
     594
     595#customize-control-header_image .placeholder:hover .dice,
     596#customize-control-header_image .header-view:hover > button.random .dice {
    592597    -webkit-animation: dice-color-change 3s infinite;
    593598    -ms-animation: dice-color-change 3s infinite;
  • trunk/src/wp-includes/class-wp-customize-control.php

    r27947 r27970  
    772772        <script type="text/template" id="tmpl-header-choice">
    773773            <# if (data.random) { #>
    774 
    775             <div class="placeholder random">
    776                 <div class="inner">
    777                     <button type="button"><span class="dashicons dashicons-randomize dice"></span>
    778                     <# if ( data.type === 'uploaded' ) { #>
    779                         <?php _e( 'Randomize uploaded headers' ); ?>
    780                     <# } else if ( data.type === 'default' ) { #>
    781                         <?php _e( 'Randomize suggested headers' ); ?>
    782                     <# } #>
     774                    <button type="button" class="button display-options random">
     775                        <span class="dashicons dashicons-randomize dice"></span>
     776                        <# if ( data.type === 'uploaded' ) { #>
     777                            <?php _e( 'Randomize uploaded headers' ); ?>
     778                        <# } else if ( data.type === 'default' ) { #>
     779                            <?php _e( 'Randomize suggested headers' ); ?>
     780                        <# } #>
    783781                    </button>
    784                 </div>
    785             </div>
    786782
    787783            <# } else { #>
  • trunk/src/wp-includes/js/customize-views.js

    r27947 r27970  
    122122
    123123            if (this.model.get('random')) {
    124                 this.$el.addClass('button display-options');
    125124                this.setPlaceholder(40);
    126125            }
Note: See TracChangeset for help on using the changeset viewer.