Make difference between identifiers declared vs. used

Open
#463 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
css, typescript
Domain
devtools

Research direction

The issue names no files, tests, or entry points. Start by locating the analyzer logic for CSS container names and custom properties, then trace how declarations and references are represented. Done means the analysis distinguishes declared, used, both, and neither for the examples in the issue.

Written by the indexing model from the issue text.

Description

For analyzing potential unused code it would be useful to know whether some 'variables' are either declared, used, both or none.

Container names
@container my-layout (inline-size: 100px) {}

main {
  container-name: my-layout;
  /* or shorthand */
  container: my-layout / inline-size;
}

.undeclared {
  container-name: i-dont-exist;
}
Custom properties
:root {
  --example: 1;
  column-count: var(--example);
}

.unused {
  --unused: 2;
}

.undeclared {
  column-count: var(--whoops);
}

.undeclared-fallback {
  column-count: var(--whoops, var(--whoopsie));
}
Dominant language
TypeScript
Stars
366
Forks
15
Avg merge
3h 23m
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

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.

More from projectwallace/css-analyzer

All issues in projectwallace/css-analyzer

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.