In CSS there is no way to select a sibling with plus if the sibling is above in the output, a preceding element in the html.
For example
<div class="first">
<div class="second">
.second + .first { style applied to div.first}
Is there anyway to do this in SASS/SCSS?
可能会或可能不适合您的需求,但是您可以在Sass / CSS中使用常规的同级选择器。这将选择同一节点级别上的所有元素(在此之前未明确指定,但仍很方便):