- IDE name and version:
WebStorm 2019.2.3
Build #WS-192.6817.13, built on September 24, 2019
Runtime version: 11.0.4+10-b304.69 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
- Styled-components plugin version:
1.0.11
Problem description:
In some cases, when there is a css function inside templated string I'm getting the following error: ':' term expected
This error doesn't appear all the time. If I play around with the code it will randomly hide and appear later on. This error only appears when the plugin is enabled, so I assume it comes from it. This behavior seems to be a regression since I've been using the plugin for a long time and never saw it before.
Example of code that this error sometimes appear:
const OptionLabel = styled.div`
${(props: {}) => css`
margin-bottom: 0.3em;
`};
`;
Screenshot:

Adding/Removing a semicolon doesn't help. The only solution I found so far is to avoid nesting css entirely.