Inline category badge styles - Change to Stylesheet


(Scott Trager) #1

@Bill_S pointed this out to me this morning…

There shouldn’t be any inline styles. Otherwise, we cannot style those particular elements. Can we get them moved to the style sheet? Please?


(Jeff Atwood) #2

This is not a bug, those colors are set via the category preferences as in “this is the color that represents this category”. To change them click edit on the category and specify a new color for the category badge…


(Sam Saffron) #3

I agree its not a bug, but it does make customizing category badges a bit more tricky.

Longer term I am happy to clean up the extensibility method here, you can probably just override the function in a plugin / site extension.


(Scott Trager) #4

We found a way to override it using !important, but it’s a bit of a hack…

You also cant can’t the color directly on /category (for “all categories”) since there is no Edit option there.


(cpradio) #5

Actually you can, you simply have to use

.category-dropdown-menu div.cat:first { background-color: #FF0000; } /* may still need !important */

(Bill Snider) #6

Thanks guys, we got it.


(François Eric King) #7

To change them click edit on the category and specify a new color for the category badge…but iam not able to change it.

badge color in edit category popup page is not clickable or editable. Any clue?


(cpradio) #8

Can you provide a screenshot?


(Thomas Emmpunkt) #9


#10

if you click on a colour in the background color section below it - it should change?


(Thomas Emmpunkt) #11

Yes, indeed! It changes. Even if it takes a few seconds until the “Badge color” field changes it’s color so that I as the user do notice, that I hit the right button.

Maybe “Background color” is a false leading wording. But thanks for the (more than logic) hint!