I've delcared my modifier to the P element as per below. In HTML (at the bottom), what am I doing incorrectly as the p tags do not change to pink if I declare the class name as shown.
p {
font-size: 1rem;
&--pink{
color: pink;
}
}
<p class="block__p --pink">this is placeholder text.</p>
I thought it was a simple spacing error from the p to the " --pink" but that makes no difference to the outcome.
<p class="block__p--pink">this is placeholder text.</p>
The correct selector for a
<p>tag with a class of--pinkisp.--pink. You are missing the.(class selector).See it working.
I recommend The Sass Playground, which allows you to see in real time the CSS output of your SCSS.