Different background color only on posts

Hi,

I want to change the background color of my site, but only on posts/threads.

Tag that controls background color is html

But there is no specific class in html tag for posts.

It works if I use this code:

html .archetype-regular {
    background-color: #F5F5F5;
}

But it messes with this other code provided by @Don that I’m using to use a different color for .topic-body

.topic-body {
    background-color: #fff;
    &.highlighted {
        animation: background-fade-highlight-custom 2.5s ease-out;
    }
}

@keyframes background-fade-highlight-custom {
  0% {
    background-color: var(--tertiary-low);
  }
  100% {
    background-color: #fff;
  }
}

What should I do?

Please help

Hello,

I am not sure I understand. Could you share some screenshot, mockup what you want to achieve? :slightly_smiling_face:

2 Likes

Not sure what you mean to achieve, or what conflicts with what code from Don?

But you can use !important to give priority to your CSS. Example:

.topic-body {
    background-color: #fff !important;
}
1 Like