CSS behavior changed after software update

I think there might be two problems here, the first being that you should add body before :not, otherwise :not can be any div without the class.

The second problem is that these styles are clashing with each other:

:not(.staff) .topic-list .category-marketplace a[data-tag-name="wagon"] {
  display: none !important;
}

:not(.primary-group-dealers) .topic-list .category-marketplace a[data-tag-name="wagon"] {
  display: none !important;
}

:not(.primary-group-brokers) .topic-list .category-marketplace a[data-tag-name="wagon"] {
  display: none !important;
}

The first style will hide the wagon tag if you’re not staff… but the second and third styles will hide the wagon tag if your primary group is also not dealers/brokers. You’d need to be all 3 to avoid display: none;.

I think instead you’d want to combine the 3 like this:

body:not(.staff):not(.primary-group-dealers):not(.primary-group-brokers)  .topic-list .category-marketplace a[data-tag-name="wagon"] {
  display: none;
}

The first way, with the 3 separate styles acts as a “not and”:

not staff and primary-group-dealers and primary-group-brokers

The second way, with the chained :not acts as an “or”:

not staff or primary-group-dealers or primary-group-brokers

4 Likes