How to declare a variant on component which is another component?
.componentThe element you want to style.another-conflicting-componentThe selector you want to insert
- SASS
+component('.component')
+register
+spot-exception-variant('.another-conflicting-component')
+default
display: inline-flex
+spot-exception-variant('.another-conflicting-component')
position: relative
- CSS
.component {
display: inline-flex;
}
.component .another-conflicting-component {
position: relative;
}
More info: +spot-exception-variant, +default, +register, +component