WordPress.org

Make WordPress Core

Changeset 41595


Ignore:
Timestamp:
09/25/17 21:45:57 (4 months ago)
Author:
westonruter
Message:

Code Editors: Update the current file highlight to use notice styling.

Improves color contrast and readability, and reuses a core design pattern.

Props kekkakokkers, monopine, Travel_girl, afercia, melchoyce, karmatosed.
Fixes #31604.

Location:
trunk/src/wp-admin
Files:
3 edited

Legend:

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

    r41586 r41595  
    14621462} 
    14631463 
     1464.wrap #templateside .notice { 
     1465    display: block; 
     1466    margin: 0; 
     1467    padding: 5px 12px; 
     1468    font-weight: 600; 
     1469    text-decoration: none; 
     1470} 
     1471 
     1472.wrap #templateside span.notice { 
     1473  margin-left: -12px; 
     1474} 
     1475 
     1476#templateside li.notice a { 
     1477  padding: 0; 
     1478} 
     1479 
    14641480/* Update icon. */ 
    14651481.update-message p:before, 
  • trunk/src/wp-admin/plugin-editor.php

    r41586 r41595  
    322322        continue; 
    323323    } 
    324 ?> 
    325         <li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&amp;plugin=<?php echo urlencode( $plugin ) ?>"><?php echo esc_html( $plugin_file ); ?></a></li> 
     324    ?> 
     325    <li class="<?php echo esc_attr( $file === $plugin_file ? 'notice notice-info' : '' ); ?>"><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ); ?>&amp;plugin=<?php echo urlencode( $plugin ); ?>"><?php echo esc_html( $plugin_file ); ?></a></li> 
    326326<?php endforeach; ?> 
    327327    </ul> 
  • trunk/src/wp-admin/theme-editor.php

    r41586 r41595  
    284284 
    285285        if ( $absolute_filename === $file ) { 
    286             $file_description = '<span class="highlight">' . $file_description . '</span>'; 
     286            $file_description = '<span class="notice notice-info">' . $file_description . '</span>'; 
    287287        } 
    288288 
Note: See TracChangeset for help on using the changeset viewer.