Skip to main content

How to declare a components sub-element?

.component .elementThe selector you want to insertThe element you want to style

See example

.btn .iconThe selector you want to insertThe element you want to style
+component('.btn')
+register
+element('.icon')

display: inline-flex
background-color: grey

+_____________________
+element('.icon')
display: inline-block
margin-right: 0.25em




.btn {
display: inline-flex;
background-color: grey;
}

.btn .icon {
display: inline-block;
margin-right: 0.25em;
}

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