How to do sibling selectors with Styletron or other CSS-in-JS frameworks?

602 Views Asked by At

How can I translate this (LESS):

.urlBox {
    background: #ddd;
    border-radius: 5px;
    padding: 5px;

    + .urlBox {
        margin-top: 5px;
    }
}

To Styletron?

So far I've got this:

const UrlBox = styled('div', {
    background: '#ddd',
    borderRadius: '5px',
    padding: '5px',
});

But I can't figure out how to do the sibling selector (+).

1

There are 1 best solutions below

0
On

In JSS we have nested syntax, which is similar to less/sass.