mgechev / mgechev/codelyzer

no-unused-css rule does not find class usage inside of nested *ngFor's

Open
#364 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
TypeScript
Stars
2.5k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

CSS:

```
.section {
margin: 10px;
}

.section label {
color: blue;
}
```

Template:

```



{{item.name}}


```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the no-unused-css result with the nested *ngFor template and CSS shown in the issue. Trace the rule's Angular template traversal and add a regression test for the nested loop case. Done means the .section and .section label usages are recognized without false unused-CSS reports.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, css, typescript
Domain
frontend, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.