Why won't it let me use .wrapA? .wrap is not in the css

I was working on improving the css.

Why is this giving me an error?

.wrap is being used nowhere in the css.

This makes no sense to me.

Why won’t it let me use .wrapA?

error:
https://jsfiddle.net/rLnyacov/6/

  const wrapper = document.querySelector(".wrapA");
  wrapper.classList.add("visible");

no error:
https://jsfiddle.net/rLnyacov/5/

  const wrapper = document.querySelector(".wrap");
  wrapper.classList.add("visible");
.wrapA {
  opacity: 0;
  transition: opacity ease-in-out 3s;
  transition-delay: 0s;
}

.wrapA.visible {
  opacity: 1;
}

Because you’re using wrap in your html (which is what JS queries, not wrapA
image

2 Likes