Open jewe11er opened 2 years ago
This works:
styled.div`
@media (max-width: 1440px) {
color: green;
}
`;
whereas
const maxWidth = "(max-width: 1440px)";
styled.div`
@media ${maxWidth} {
color: green;
}
`;
gives
Property 'color' is allowed only in following media groups: visual
This is probably connected to https://github.com/styled-components/webstorm-styled-components#faq
Why am I seeing syntax errors after a template argument?
Problem description:
Problem with media queries:
@media ${({ theme }) => theme.devices.tablet} { margin-top: 0; }
Webstorm shows warning:
Property 'margin-top' is allowed only in following media groups: visual