SCCS has a parent link
How to make a link to the first nearest parent
SCSS
.checkbox { input[type="checkbox"] { display: none; } .checkbox-label { display: inline-block; vertical-align: middle; font-size: 12px; &:before { content: ""; display: inline-block; vertical-align: middle; width: 12px; height: 12px; border: 1px solid #CCC; margin-right: 5px; } input[type="checkbox"]:checked + & { &:before { background-color: #0066cc; } } } } The output is CSS
.checkbox input[type="checkbox"] { display: none; } .checkbox .checkbox-label { display: inline-block; vertical-align: middle; font-size: 12px; } .checkbox .checkbox-label:before { content: ""; display: inline-block; vertical-align: middle; width: 12px; height: 12px; border: 1px solid #CCC; margin-right: 5px; } input[type="checkbox"]:checked + .checkbox .checkbox-label:before { background-color: #0066cc; } Why the necessary style is not applied or how to make & as a link to the first nearest parent?
but it is worth making a line
input[type="checkbox"]:checked + .checkbox-label:before { background-color: #0066cc; } and the style starts working
JSFIDDLE example
+works this way. - Grundy&full path is inserted. But maybe something can be found in the help or some extension can be used - Grundy