Skip to main content

How to declare a context of the component?

.contextThe selector you want to insert .componentThe element you want to style

See example

.modalThe selector you want to insert .btnThe element you want to style
+component('.btn')
+register
+context('.modal')

+default
display: inline-flex
font-size: 1.25em

+context('.modal')
font-size: 0.75em




.btn {
display: inline-flex;
font-size: 1.25em;
}

.modal .btn {
font-size: 0.75em;
}

More info: +context, +default, +register, +component