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.

Built from https://develop.svn.wordpress.org/trunk@41595


git-svn-id: http://core.svn.wordpress.org/trunk@41428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-09-25 21:46:47 +00:00
parent eea0e5f6f5
commit f1779f24ed
7 changed files with 38 additions and 6 deletions

View File

@ -1461,6 +1461,22 @@ div.error {
margin: 5px 0 15px; 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-right: -12px;
}
#templateside li.notice a {
padding: 0;
}
/* Update icon. */ /* Update icon. */
.update-message p:before, .update-message p:before,
.updating-message p:before, .updating-message p:before,

File diff suppressed because one or more lines are too long

View File

@ -1461,6 +1461,22 @@ div.error {
margin: 5px 0 15px; 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 icon. */
.update-message p:before, .update-message p:before,
.updating-message p:before, .updating-message p:before,

File diff suppressed because one or more lines are too long

View File

@ -322,7 +322,7 @@ foreach ( $plugin_files as $plugin_file ) :
continue; 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; ?> <?php endforeach; ?>
</ul> </ul>
</div> </div>

View File

@ -283,7 +283,7 @@ if ( $allowed_files ) :
} }
if ( $absolute_filename === $file ) { 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; $previous_file_type = $file_type;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.9-alpha-41594'; $wp_version = '4.9-alpha-41595';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.