projectwallace / projectwallace/css-analyzer

Calculate usage of layered vs un-layered rules

Open
#251 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

✨ enhancement
Dominant language
TypeScript
Stars
366
Forks
15
Avg merge
3h 23m
Merged PRs (30d)
3

Description

CSS can be in an @layer atrule, or not. It would be interesting how many rules/selectors/declarations are within layers and how many aren't.
Maybe even report it in a way so it's possible to visualize it like @bramus did in his 2022 CSS Day talk about the cascade.

[
	{ 
		name: 'reset', 
		atrules_count: 0,
		rule_count: 10, 
		selector_count: 12, 
		declarations_count: 22,
	},
	{ 
		name: '<anonymous>', // unnamed layer
		atrules_count: 2,
		rule_count: 36, 
		selector_count: 83, 
		declarations_count: 152,
	},
	{ 
		name: '<unlayered>', // not inside a layer
		atrules_count: 0,
		rule_count: 1, 
		selector_count: 2, 
		declarations_count: 4,
	}
]

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.

Research direction

No file, test, or entry point is named in the issue. Begin by locating the analyzer's existing rule and statistics collection path, then determine how layered, anonymous-layer, and unlayered results should be represented; done means reporting atrule, rule, selector, and declaration counts in a visualization-friendly structure.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
analytics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.