XF 2.0 Sticky thread background color

Betclever

Well-known member
Hi,

Since XF2, I'm not able to change the background color of the sticky threads.
Is there another class?

Thanks.
 
I tried this code but only the background color doesn't apply even with !important

CSS:
/* Border between sticky/normal threads */
.structItemContainer-group--sticky {
    border-bottom: 6px solid;
    color: xf-diminish(@xf-borderColor, 6%);
}

.structItemContainer-group--sticky {
      background-color: orange !important;
}

.structItemContainer-group--sticky .structItem-title a:link,
.structItemContainer-group--sticky .structItem-title a:visited {
    color: @xf-paletteColor4;
}

.structItemContainer-group--sticky {
      background-color: orange !important;
}

.structItemContainer-group--sticky .structItem-title a:link,
.structItemContainer-group--sticky .structItem-title a:visited {
    color: @xf-paletteAccent3;
}
 
You'll need to approach it like I mentioned locked threads:

https://xenforo.com/community/threads/lock-thread-color.147762/#post-1254780

Template: thread_list_macros

Find this:

Code:
<div class="structItem structItem--thread

Add right after:

Code:
{{ $thread.sticky ? '' : ' is-sticky' }}

Then the CSS:

Code:
.structItem.is-sticky {  background-color: orange !important; }

Should work.

Thanks for the return Russ but it doesn't work.
In fact, I added your code but the part which is orange is the normal one so normal threads.

What's wrong?

1527369362591.webp
 
https://xenforo.com/community/resources/sticky-thread-simple-styling.5794/

safariscreenshot087-png.161097
 
Back
Top Bottom