How do you tell how not trying to fix css with javascript

They said stop trying to fix CSS with JavaScript. CSS isn't broken.

Then, how to you tell that CSS can do jobs like highlight or put effect on selected text or page blackout on image click.

I'm not good at front-end thing though, I can't see how to do these without fix it with JavaScript.

I intend to ask that how do you tell that this thing must be attempt with CSS first.

Any suggestions,

Poster :