0
Ich möchte den folgenden Selektor B__E.B__E--M
so erhalten, dass B__E--M
nur gilt, wenn das Element auch die B__E
Klasse hat;Classbuilding mit scss (Doppel kaufmännisches Und)
Ich habe folgendes:
.B {
&__E {
// default color
&--M {
// Color i want
}
}
}
Das Problem ist, dass die --M
Modifikator eine andere Farbe anwenden sollte, aber nicht überschreibt die Standardfarbe aus dem __E
Element.
ist dies nicht erlaubt:
.B {
&__E {
// default color
}
}
.B__E.B__E--M {
// color i want
}
Wenn nichts möglich ist, wäre dies meine Vermutung:
.B {
&__E {
// default color
&.B__E--M {
// Color i want
}
}
}
Genau! Wusste das nicht;) – Mazz