I've been struggling to make the CSS :not() selector work in a specific way and despite searching for solutions, I haven't been successful. I came across some helpful resources like this page, but I couldn't figure it out on my own. Hopefully, someone here can shed some light on this for me.
My goal is to blur certain text while leaving other text untouched. Below is the HTML/CSS code:
<div class="top-hide">
<p class="reveal">Paragraph 1</p>
<div class="reveal">Paragraph 2</div>
<div class="reveal"><p>Paragraph 3</p></div>
<div><p class="reveal">Paragraph 4</p></div>
<div class="reveal"><p class="reveal">Paragraph 5</p></div>
<p>Paragraph 6</p>
<div>Paragraph 7</div>
<div><p>Paragraph 8</p></div>
</div>
.top-hide :not(.reveal) {
color: transparent;
text-shadow: 0 0 10px black;
}
My intention is to reveal paragraphs 1 to 5 while blurring out paragraphs 6 to 8. However, only paragraphs 1, 2, and 5 are revealed while the rest remain blurred. Can you please help me understand why my CSS isn't working and provide the correct solution to achieve my desired outcome?
I've created a demonstration of the issue I'm facing using JSFiddle.
Thank you in advance.