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
- SASS
+component('.btn')
+register
+element('.icon')
display: inline-flex
background-color: grey
+_____________________
+element('.icon')
display: inline-block
margin-right: 0.25em
- CSS
.btn {
display: inline-flex;
background-color: grey;
}
.btn .icon {
display: inline-block;
margin-right: 0.25em;
}
More info: +element, +register, +component, separator +___