XF 2.2 Unread thread titles bold, read thread titles normal

oldford

Active member
I made a custom style and somehow I've managed to set it so all thread titles are bold, whether they have been visited or not. I want the unread titles to be bold, but the visited (read) titles to be normal weight, just like it is in the default style.

As a test I deleted everything in extra.less. The result was that all links turned to regular weight, regardless of whether they were visited or not.

So there must be some other style setting that I'm missing. I went to Style Properites > Page Setup > Links but the link text weight there is set to normal.

Where else should I be looking to control link styles?

Thanks!
 
To my knowledge it is not possible to modify this parameter elsewhere than in extra.less

It's weird that it doesn't work anymore, do you have any unread forums?
It happened to me when I tinkered with this, I got into my head when I didn't have any unread forums.
 
Yes, I definitely have unread threads. But I appreciate the suggestion because I've certainly been known to miss the obvious before. :)

So when I tried to control it via extra.less I get mixed results. For a:visited I can control the color, but I can't control the font weight.

Here's the CSS I've added to extra.less. The font-weight: normal !important just doesn't affect the visited links for some reason.

CSS:
/* Thread list titles to bold */
.structItem-title a {
    font-weight: 600;
}
.structItem-title a:visited {
    font-weight: normal !important;
    color: @xf-paletteNeutral2;
}



1633823164546.webp
 
Did you try this ? Without a ?
Less:
/* Thread list titles to bold */
.structItem-title {
    font-weight: 600;
}
.structItem-title:visited {
    font-weight: normal !important;
    color: @xf-paletteNeutral2;
}
 
Thank you. Removing the "a" did help, but in a strange way.

I removed the "a" and then changed the font-weight to "normal" and that did it. So by default the unread thread titles are bold and I was actually making everything bold by trying to override it. I still don't quite understand how, but the following code works. I got rid of the "visited" portion all together.

CSS:
/* Thread list titles to bold */
.structItem-title {
    font-weight: normal;
}

1633824992516.webp
 
Probably due to my low level in English but I don't quite understand what you are trying to do.
By default, unread discussions are in bold and read are normal. Are you trying to do the reverse?
 
I don't blame you. I think I was causing myself a lot of confusion too.

I do want it to act as default (bold for unread, normal for read). But my style was showing bold for all thread titles, regardless of whether they were read or unread.
 
Top Bottom