Search code examples
csscolors

Exclude images from CSS filter


I got this css class (its applied on the body) and i don't wan't to invert the color of the images. how can i prevent this?

.dark{
  filter: invert(1);
  background-color: #222;
}

Solution

  • Try using :not selector.

    Edit: Using :not won't work here