Solved

Custom Styling of Category Name in Activity Feeds

  • 13 February 2024
  • 7 replies
  • 79 views

Userlevel 6
Badge +7

Desired Outcome: Different color styling on the Category name in activity feeds.

For example, if I was building this for the GS community, I’d be trying to have the “Build Communities” and “Customer Success (CS)” category names below use two different colors. 

 

Anyone know how this might be done? I’d imagine it’s a Thirty Party Script if it’s possible at all. But I’m open to custom CSS too if that’s an option. (I’m out of my technical depth here)

 

 

icon

Best answer by leo-inspired 15 February 2024, 07:13

View original

7 replies

Userlevel 2

Don’t have an answer to this but count me in to vote on it if it becomes a Product Idea. I imagine it could be similar to the look of Article labels and Idea statuses.

Userlevel 3
Badge +1

Loved the idea as well @DannyPancratz 

This should do the job, add it to your Third-party Scripts section on Control:

<script>
$(".topic-view_header-item_category-link:contains('Category Name')").css('color', 'red');

</script>

 

Userlevel 4
Badge +4

Nice idea @DannyPancratz 🙌, so much so we’ve implemented on our own community 😁

Userlevel 6
Badge +7

@leo-inspired Thank you! 

@olimarrio woah! Cool!!!

Userlevel 6
Badge +7

@leo-inspired in that script, you have the example color as ‘red’

But in your implementation here on the community, you’re using branded colors to match your theme. How do you specify those colors? Is it name of colors? Hexcodes? 

I’m outside of my technical depth when it comes to scripts, and I’m looking at how to specify the exact branded color I want for my use cases. 

Userlevel 3
Badge +1

CSS you can use either colors or hexcodes. On our community we used the hexcode on the script.

If you’d like to use your brand color, you’ll need to use inspect your homepage and find the colors you’re using. Or you can ask your design team which hexcodes they mostly use.

If you search on Google "Color picker css”, you’ll get a picker where you can mix colors and get the hexcode:
 

 

Userlevel 6
Badge +7

I have the hexcodes, thank you for the help!

Reply