Change CSS using CSS by selecting CSS!!! (Quick)

I'm a little late to the party with this one but I've never had the need to use it so here it is.

div.class-name[style*="display: flex"] {
    display: none;
}

If the style attribute on an element has the contents of display: flex; then you can select only the elements with that being true and then apply any CSS you want!