Skip to main content

How to declare a sub-element with inner conditions?

.component .elementThe element you want to style:has(.sub-element)The selector you want to insert
+component('article')
+register
+variant('.new')
+element('.header:has(.emoji)')

display: inline-flex

+__________________________________
+element('.header:has(.emoji)')
+default
font-size: 1em

+variant('.new')
font-size: 2em





article {
display: inline-flex;
}

article .header:has(.emoji) {
font-size: 1em;
}

article.new .header:has(.emoji) {
font-size: 2em;
}

More info: +variant, +default, +element, +register, +component, separator +___