dark icon indicating copy to clipboard operation
dark copied to clipboard

[styled] comment breaks styles

Open einar-hjortdal opened this issue 8 months ago • 1 comments

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%;
    }
  `}
`

einar-hjortdal avatar Jun 16 '24 08:06 einar-hjortdal