43081j / 43081j/postcss-styled-components
Nested css in template results in skipping template
- Vorherrschende Sprache
- TypeScript
- Sterne
- 12
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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`
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- developer-experience, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100