Make WordPress Core

Ticket #36447: 36447.patch

File 36447.patch, 2.0 KB (added by Cheffheid, 9 years ago)
  • wp-admin/css/customize-controls.css

     
    228228        border-left-color: #0073aa;
    229229}
    230230
     231/* CSS Tooltips */
     232#customize-controls .tooltip {
     233        position: relative;
     234        overflow: visible;
     235}
     236
     237#customize-controls .tooltip:after {
     238        display: none;
     239        position: absolute;
     240        bottom: 100%;
     241        right: 50%;
     242        border: 1px solid #ddd;
     243        margin-bottom: 5px;
     244        padding: 5px 8px;
     245        background: rgba(27,31,35,0.8);
     246        color: #fff;
     247        content: attr(aria-label);
     248        text-align: center;
     249        transform: translateX(50%);
     250        white-space: pre;
     251        opacity: 0;
     252}
     253
     254#customize-controls .tooltip:hover:before,
     255#customize-controls .tooltip:focus:before,
     256#customize-controls .tooltip:hover:after,
     257#customize-controls .tooltip:focus:after {
     258        display: inline-block;
     259        opacity: 1;
     260}
     261
    231262#accordion-section-themes + .control-section {
    232263        border-top: 1px solid #ddd;
    233264}
  • wp-admin/customize.php

     
    185185                                                        continue;
    186186                                                }
    187187                                                $active = ! empty( $settings['default'] );
    188                                                 $class = 'preview-' . $device;
     188                                                $class = 'tooltip preview-' . $device;
    189189                                                if ( $active ) {
    190190                                                        $class .= ' active';
    191191                                                }
    192192                                                ?>
    193                                                 <button type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>">
    194                                                         <span class="screen-reader-text"><?php echo esc_html( $settings['label'] ); ?></span>
     193                                                <button aria-label="<?php echo esc_html( $settings['label'] ); ?>" type="button" class="<?php echo esc_attr( $class ); ?>" aria-pressed="<?php echo esc_attr( $active ) ?>" data-device="<?php echo esc_attr( $device ); ?>">
    195194                                                </button>
    196195                                        <?php endforeach; ?>
    197196                                </div>