43081j / 43081j/postcss-styled-components
Nested css in template results in skipping template
- Ngôn ngữ chính
- TypeScript
- Star
- 12
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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`
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100