Theme-specific background for categories


(Dave Higgins) #1

I just switched to the Dark theme for viewing my Discourse instance on mobile. I’d set a background image which is very light which looks great with the default light view. But with the Dark theme the light text is is lost because my light background remains.

I’d like to be able to set a background image for each theme, or restrict the background image to be used only with specific themes. Is this possible?


(Jeff Atwood) #2

It’s a question for @sam to ponder


(Sam Saffron) #3

Sure, I covered this here:


(Dave Higgins) #4

Thanks - I added this CSS to the Dark theme, where “Foo Bar” is the category name (which is picked up and used in the CSS, so if you change your category name you’ll have to change the CSS edit too).

body.category-foo-bar {
    background-image: none;
}