CSS: select item by data-filter attribute

I have to remove certain items from a nav, which differ by their data-filter attribute. How can I refer to the specific list-items?
Such as, if I wanted to remove the item by data-filter “.category-xyz”:

<li class="filter" data-filter=".category-xyz"<span>xyz</span></li>

I tried loads – all without any errors – nothing finds the specific list-item. I tried: (all each)

.filter-holder ul:nth-child(3){
    display:none;
}

.filter .category-xyz{
    display: none;
}

.filter-holder ul li[data-filter*=".category-xyz"]{
display: none;
}

li[data-filter=".category-xyz"]{
    display:none;
}

.filter-holder ul li[data-filter|=category-xyz]{
display: none;
}

Somebody help?

Read more here: CSS: select item by data-filter attribute

Leave a Reply

Your email address will not be published. Required fields are marked *