Dac Saunders Dac Saunders - 5 months ago 21
CSS Question

How do I change the color of Semantic UI icons?

I can make thumbs up icon with the code

<i class="thumbs up icon large"></i>

But how can I change the color from black to gray? I do it for a chrome extension and I add the CSS this way in the

"content_scripts": [
"matches": ["http://*/*", "https://*/*"],

"css": [ "tab/layouts/style.css", "app/lib/semantic.min.css" ],
"js": [ "common/owconstants.js", "common/OWprotocol.js", "3rdparty/jquery-1.10.2.min.js", "3rdparty/jquery.mCustomScrollbar.concat.min.js", "3rdparty/jquery-ui-1.10.3.custom.min.js", "common/common.js", "tab/sidebars.js", "tab/communication.js", "tab/syncobject.js", "tab/popup.js", "tab/authorization.js", "tab/userinfo.js", "tab/annotation.js", "tab/usercard.js", "tab/userlist.js", "tab/notifications.js", "tab/friendlist.js", "tab/injection.js", "tab/drops.js", "tab/chat.js", "tab/tracking.js", "tab/keywords.js", "tab/tabscript.js", "app/lib/semantic.min.js"]


You can apply:

color: gray; // or any suitable color code, e.g. #808080

to one of the existing classes thumbs up icon large if suitable, or add a new class of your own and apply styling to this instead:


<i class="thumbs up icon large own-class"></i>


.own-class {
    color: gray;