typescript-styled-plugin icon indicating copy to clipboard operation
typescript-styled-plugin copied to clipboard

Unexpected error for "of <selector>" syntax

Open htunnicliff opened this issue 2 years ago • 0 comments

The :nth-last-child() psudeo-class supports an optional selector argument: the of <selector> syntax.

Here is an example:

export const Example = styled.div`
  & > *:nth-last-child(-n + 3 of li.important) {
    padding-bottom: 10px;
  }
`;

When using this syntax, the following unexpected errors occur:

At the & character:

} expected [ts-styled-plugin(9999)]

At the closing } character:

at-rule or selector expected [ts-styled-plugin(9999)]

Expected Behavior

No errors occur since syntax is valid.

htunnicliff avatar Oct 19 '23 22:10 htunnicliff