I could not find any examples on how to use the adjacent sibling selector, e.g .room-<id> + .room-<id>.
I've tried using the following without any luck:
const styles = {
room: {
display: "flex",
padding: [25, 20],
"$room + $room": {
borderTop: [1, 'solid', '#eee'],
}
}
}
But great library! :-)
You want to target current rule?
If you are already using jss-nested which is part of default preset, you can simply do & + &, like in sass, & is replaced by the parent class.
Ah heck, yes - it did not work since each element was wrapped in another div.
So its what you need? Otherwise I don't know what you are trying to achieve.
The output is correct & + &. So no issues. Closing is fine
Most helpful comment
If you are already using jss-nested which is part of default preset, you can simply do
& + &, like in sass, & is replaced by the parent class.