Skip to content

Instantly share code, notes, and snippets.

@bfintal
Last active September 2, 2016 09:54
Show Gist options
  • Save bfintal/c0951481922318e1f0ae1837216737da to your computer and use it in GitHub Desktop.
Save bfintal/c0951481922318e1f0ae1837216737da to your computer and use it in GitHub Desktop.
Cleans up the colors of icons in the admin main menu, TinyMCE buttons, and buttons beside the "Add Media" button. Inspired by Ahmad Awais' post https://ahmadawais.com/bad-icon-wp-admin/
/* Adjust admin menu icons */
#adminmenu li div.wp-menu-image img {
opacity: 1;
-webkit-filter: contrast(100%) invert(1) sepia(100%) grayscale(1) contrast(75%);
filter: contrast(100%) invert(1) sepia(100%) grayscale(1) contrast(75%)
}
#adminmenu li:hover div.wp-menu-image img {
-webkit-filter: invert(1) grayscale(100%) sepia(100%) saturate(1000%) hue-rotate(170deg);
filter: invert(1) grayscale(100%) sepia(100%) saturate(1000%) hue-rotate(170deg);
}
/* Adjust TinyMCE buttons */
i.mce-ico {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
/* Adjust "Add Media" buttons */
#wp-content-media-buttons img {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment