Skip to main content

How to declare a sub-element with :where() condition?

.component .elementThe element you want to style:where(.condition)The selector you want to insert
+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





.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 +___