Skip to main content

How to declare a context of of the same component?

.component ~The selector you want to insert .componentThe element you want to style

See example

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

+default
display: inline-flex

+context('.btn ~')
margin-left: 0.5em




.btn {
display: inline-flex;
}

.btn ~ .btn {
margin-left: 0.5em;
}

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