This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Description
I have the code below, and ts-styled-plugin is complaining about it, even though it appears to be syntactically valid...
const CardSize = styled.div`
width: 400px;
height: 400px;
@media (max-width: 575px) {
width: 200px;
height: 400px;
}
`
const FlipContainer = styled(CardSize)`
perspective: 1000px;
`
const Flipper = styled.div`
transition: 0.6s;
transform-style: preserve-3d;
position: relative;
${FlipContainer}:hover & { // [ts-styled-plugin] semi-colon expected (on the '{')
transform: rotateY(180deg);
} // [ts-styled-plugin] at-rule or selector expected (on the '}')
`
On the Flipper variable, it complains about the {
and }
, the first error being [ts-styled-plugin] semi-colon expected
and the second being [ts-styled-plugin] at-rule or selector expected
.
Not sure if it's related, but if I change the Flipper to the code below, it stops complaining about the last line (on the }
)
const Flipper = styled.div`
${FlipContainer}:hover & {
transform: rotateY(180deg);
}
`
Any idea why this is happening?