dark
dark copied to clipboard
[styled] comment breaks styles
The comment breaks the both the &::selection
selector styles and the media queries.
This does not happen when comments do not contain functions.
const HeroHeading = styled.h2`
/* font-family: ${props => props.theme.displayFont}; */
line-height: 1;
font-size: 180%;
&::selection{
background: ${props => props.theme.selection};
}
${props => css`
@media (min-width: ${props.theme.sm}) {
margin: 0 0 0 auto;
font-size: 500%;
}
@media (min-width: ${props.theme.xl}) {
font-size: 700%;
}
@media (min-width: ${props.theme.xxxl}) {
font-size: 900%;
}
`}
`