43081j / 43081j/postcss-styled-components

Nested css in template results in skipping template

未关闭
#7 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
12
派生
1
PR 合并指标
30 天内没有已合并 PR

描述

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`

贡献指南

这个仓库没有索引到贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
developer-experience, tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。