Introduce a .dashicons-before CSS class.

If you want to use a Dashicon before an element you can use the class because it will not change the elements content styling. With that you don't need to copy the entire `.dashicons` styling to your :before styling anymore.
To demonstrate this change, Admin Menu now uses Dashicons classes directly.

And it fixes a glitch in IE.

fixes #26630.

git-svn-id: https://develop.svn.wordpress.org/trunk@27418 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-03-05 20:03:33 +00:00
parent dd59bb2a62
commit 8f1a77a070
5 changed files with 40 additions and 59 deletions

View File

@@ -93,7 +93,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
$img_class = ' svg';
} elseif ( 0 === strpos( $item[6], 'dashicons-' ) ) {
$img = '<br />';
$img_class = ' dashicons ' . sanitize_html_class( $item[6] );
$img_class = ' dashicons-before ' . sanitize_html_class( $item[6] );
}
}
$arrow = '<div class="wp-menu-arrow"><div></div></div>';