43081j / 43081j/postcss-styled-components

Nested css in template results in skipping template

Aberta
#7 7 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
12
Forks
1
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Nesting styled-component `css` inside any styled-component template literal results in the template being skipped.

Example:
```
import styled, { css } from "styled-components"

const Foo = styled.div`
${css`
color: hotpink;
`}
`

```
Output: `[postcss (styled-components)] Skipping template (file: ...) as it included either invalid syntax or complex expressions the plugin could not interpret. Consider using a "// postcss-styled-components-disable-next-line" comment to disable this message`

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

The issue is in the postcss-styled-components syntax parser. Start by examining the parser logic in the source code, likely in a file like 'src/syntax.js' or 'src/parser.js'. Look for the condition that triggers the 'Skipping template' message when nested css is detected. Run the existing tests to see if any cover nested template literals, and add a test case for the provided example to reproduce the issue.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
typescript
Domínio
developer-experience, tooling
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Claramente especificada
Facilidade para iniciantes
45/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.