scss unable to make chained multiple classname

&formelement&has-auto-width { display: inline-block; } the second & doesn't work what's wrong?
2 Replies
Kevin Powell
Kevin Powell2y ago
quick fix:
.form {
&-formelement {
&-has-auto-width {
display: inline-block;
}
}
}
.form {
&-formelement {
&-has-auto-width {
display: inline-block;
}
}
}
Alternatively, you could use interpolation, but I find it terribly unreadable: &formelement#{&}has-auto-width but that would output to .formformelement.formhas-auto-width which is a little different. Maybe it's what you're after tho
Mert Efe
Mert Efe2y ago
thank you i actually noticed i wrote/asked it wrong
&__form__element--select.has-auto-width {
&__form__element--select.has-auto-width {
` this worked but good to see ur example to learn
Want results from more Discord servers?
Add your server