hebrerillo
Active Coder
Hello there!
What I am going to ask is probably very easy, but I did not manage to get it even after so much search.
This is the HTML:
And this is the CSS I want to achieve by using SASS:
So far, I managed to solve that by using this SASS:
But I had to use the whole selector (form-component__row--error). Is there a way to do that by using two consecutive ampersands (&&)??
Thank you so much!!!
What I am going to ask is probably very easy, but I did not manage to get it even after so much search.
This is the HTML:
HTML:
<form class='form-component'>
<div class='form-component__row'></div>
<div class='form-component__row form-component__row--error'></div>
</form>
And this is the CSS I want to achieve by using SASS:
CSS:
.form-component__row.form-component__row--error
So far, I managed to solve that by using this SASS:
Sass:
.form-component {
&__row {
background-color: lightcoral;
&.form-component__row--error {
background-color: red;
}
}
}
But I had to use the whole selector (form-component__row--error). Is there a way to do that by using two consecutive ampersands (&&)??
Thank you so much!!!