styled-components / vscode-styled-components

Syntax highlighting for styled-components
MIT License
917 stars 117 forks source link

use a child selector through `> div {}` in the emotion library, error (9999) #434

Open ahn0min opened 12 months ago

ahn0min commented 12 months ago

Describe the bug (including copyable syntax)

I'm working on a project using typescript and emotion + Next.js. If you write the code as shown in the screenshot, the error at-rule or selector expected - ts-styled-plugin(9999) will occur.

However, the UI works fine as I want.

Screenshot
image

To Reproduce

import styled from '@emotion/styled';

const Item = styled.div`
  display: flex;
  justify-content: space-between;
  align-items: center;

  >div: first-child {
    flex: 1;
    margin-right: 10px;
  }
`;

Expected behavior

Build environment (please complete the following information):

Extensions
You can get this by running $ code --list-extensions in the command line

Additional context
Add any other context about the problem here.

ahn0min commented 12 months ago

The error was avoided by downgrading to v1.7.8 => v1.7.5