My goal is to assign the class no-color
to a specific tag. When JavaScript is enabled, I want this class to be removed and the text to be colorized. However, my current CSS solution is not working as expected. Below is a sample code snippet demonstrating the issue:
SASS
:not(.no-color) {
p {
color: red;
}
}
HTML
<div class="no-color">
<p>hello world</p>
</div>