Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 manifest.js:

"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"]
    }
],
like image 940
Niklas Rosencrantz Avatar asked Sep 06 '15 09:09

Niklas Rosencrantz


People also ask

How can I change the color of my icons?

To change the color of an icon, select the icon you'd like to edit. The Format tab will appear. Then click Graphics Fill and select a color from the drop-down menu. To add an outline to your icon, click Shape Outline and select a color from the drop-down menu.

Can I change the color of an icon CSS?

Changing the colors of icons in the CSS is fairly straightforward since it simply needs to add/change the “color” property. It is recommended to include the following line at the top of the window in order to change the color of the icons to red. A link returned clinks a reusable element after pseudo element.

What are semantic colors in UI?

Semantic colors denote standard value states (such as good, bad, or warning). Each color has the same basic meaning in all contexts. Industry-specific colors reflect the color conventions in a line of business or industry.


2 Answers

You can also apply: <i class="red users icon"></i> .For more information about semantic-ui I recommend to visit this doc http://semantic-ui.com/elements/icon.html#/definition

like image 72
yaircarreno Avatar answered Nov 12 '22 03:11

yaircarreno


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:

HTML

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

Stylesheet

.own-class {
    color: gray;
}
like image 20
Gareth Whittaker Avatar answered Nov 12 '22 03:11

Gareth Whittaker