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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41595 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter 2017-09-25 21:45:57 +00:00
parent d33ab87371
commit d6a58eec48
3 changed files with 19 additions and 3 deletions

View File

@ -1461,6 +1461,22 @@ div.error {
margin: 5px 0 15px;
}
.wrap #templateside .notice {
display: block;
margin: 0;
padding: 5px 12px;
font-weight: 600;
text-decoration: none;
}
.wrap #templateside span.notice {
margin-left: -12px;
}
#templateside li.notice a {
padding: 0;
}
/* Update icon. */
.update-message p:before,
.updating-message p:before,

View File

@ -321,8 +321,8 @@ foreach ( $plugin_files as $plugin_file ) :
// No extension found
continue;
}
?>
<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>
?>
<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>
<?php endforeach; ?>
</ul>
</div>

View File

@ -283,7 +283,7 @@ if ( $allowed_files ) :
}
if ( $absolute_filename === $file ) {
$file_description = '<span class="highlight">' . $file_description . '</span>';
$file_description = '<span class="notice notice-info">' . $file_description . '</span>';
}
$previous_file_type = $file_type;