How to exclude some of the multiple pseudo-element selectors?
.component .element::beforeThe element you want to styleThe selector you want to keepThe selector you want to omit,
.component .element::after
- SASS
+component('.component')
+register
+pseudo-element('{both}', 'before', 'after')
display: flex
+________________________
+pseudo-element('{both}')
+default
display: inline-flex
+only-for('::before')
background: red
+only-for('::after')
background: green
- CSS
.component {
display: flex;
}
.component::before, .component::after {
display: inline-flex;
}
.component::before {
background: red;
}
.component::after {
background: green;
}
More info: +only-for, +pseudo-element, +register, +component, separator +___