How to declare a sub-element with :where() condition?
.component .elementThe element you want to style:where(.condition)The selector you want to insert
- SASS
+component('.btn')
+register
+variant('.large')
+element('.img:where(.emoji)')
display: inline-flex
+__________________________________
+element('.img:where(.emoji)')
+default
font-size: 1em
+variant('.large')
font-size: 2em
- CSS
.btn {
display: inline-flex;
}
.btn .img:where(.emoji) {
font-size: 1em;
}
.btn.large .img:where(.emoji) {
font-size: 2em;
}
More info: +variant, +default, +element, +register, +component, separator +___