r/csshelp • • Apr 25 '15

What CSS is required for automatically changing the color of threads according to keywords?

I was wondering how I can get threads with the keywords 'Xbox' 'Playstation' and 'PC' different colors. So Green for Xbox, blue for Playstation, and bage for PC. my subreddit is /r/BuyMyPlayer

7 Upvotes

5 comments sorted by

1

u/ri0tnrrd Apr 25 '15

The code to start you up would be:

/*Change color of self posts depending on their title*/
#siteTable a[href*="pic"].title { color: #FF6600;} /*This one changes posts that say "pic" to orange*/
#siteTable a[href*="find"].title { color: #FF6600;} /*Just change "pic to whatever you want it to change, it just has to be all lowercase. Feel free to change the color*/

And the link to more info is here

ri0t

1

u/lazenbooby Apr 25 '15

Could this be done with flair? Or is Automod the only option for that?

1

u/ri0tnrrd Apr 25 '15

Nope no automod needed, or flair for that matter really. This just literally changes to color of the words for that post to whatever you want according to the keyword(s) you want.

It can also be done with flair, and hhmmmm you know I'm not entirely certain about automod. I know you can automatically fair a post, and give it a specific thumbnail according to pre-defined keywords in automod.

ri0t

1

u/Emitrist Apr 26 '15

This can be done with AutoMod, and you can set code in CSS for assigning text color for certain flair used. I can help you with this if you want.

1

u/lazenbooby Apr 26 '15

Nah you're fine thank you. I know how to do it with AM but was wondering if there was another option.

Thanks though :)