I've recently switched to using styled-components for my styling and I've been trying to get the @supports feature of CSS to work but with no luck.
The @supports syntax is used somewhat like:
@supports (display: grid) {
.Container {
background-color: orange;
}
}
Now this is fine as the styled-components docs have the following line:
Note: Ampersands (&) get replaced by our generated, unique classname for that styled component
But when I try using the ampersand to use this, it doesn't work. When using the below code I get an ampersand in the outputted CSS
const Container = styled.div`
@supports (display: block) {
& {
background-color: seagreen;
}
}
`;