XF 2.2 need quick extra.less css help (how to hide css from specific page)

sross

Active member
I am hoping someone can help out here. For this css entry:

Code:
.structItem.is-unread .structItem-title::after {
content: "New";
display: inline-block;
background: rgba(139,195,74,0.95);
padding: 1px 4px;
font-size: 11px;
color: white;
border-radius: 3px;
margin-left: 5px;
position: relative;
top: -2px;
}

It works fine, but I do not want this to be active on "New Posts" page. Is there a bit of code that can hide it on specific pages like new posts?

Thanks!
 
Use this to apply it to specific templates:

HTML:
[data-template="template-name"],
[data-template="template-name"],
[data-template="template-name"]
{
    ...
}
 
Less:
[data-template="template-name"] {
    .structItem.is-unread .structItem-title::after {
        display: none;
    }
}
❓
like this?

Code:
[data-template="whats_new_posts"]
{
.structItem.is-unread .structItem-title::after {
display: none;
content: "New";
display: inline-block;
background: rgba(139,195,74,0.95);
padding: 1px 4px;
font-size: 11px;
color: white;
border-radius: 3px;
margin-left: 5px;
position: relative;
top: -2px;
}
}

I'll try this but I may have it wrong
 
Top Bottom