{"id":24133438,"url":"https://github.com/projectwallace/css-layer-tree","last_synced_at":"2026-04-05T23:08:47.677Z","repository":{"id":262062872,"uuid":"886115752","full_name":"projectwallace/css-layer-tree","owner":"projectwallace","description":"Discover the composition of your CSS @layers","archived":false,"fork":false,"pushed_at":"2024-11-29T13:17:42.000Z","size":144,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T15:29:52.986Z","etag":null,"topics":["architecture","composition","css","layer"],"latest_commit_sha":null,"homepage":"https://www.projectwallace.com/css-layers-visualizer","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectwallace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-10T08:36:13.000Z","updated_at":"2024-12-14T16:51:28.000Z","dependencies_parsed_at":"2025-01-04T15:27:30.690Z","dependency_job_id":"1f91f74d-f777-47f5-b9cf-1096c5806f8d","html_url":"https://github.com/projectwallace/css-layer-tree","commit_stats":null,"previous_names":["projectwallace/css-layers","projectwallace/css-layer-tree"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fcss-layer-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fcss-layer-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fcss-layer-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fcss-layer-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectwallace","download_url":"https://codeload.github.com/projectwallace/css-layer-tree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233550309,"owners_count":18692826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","composition","css","layer"],"created_at":"2025-01-11T23:37:49.756Z","updated_at":"2025-09-19T04:31:12.614Z","avatar_url":"https://github.com/projectwallace.png","language":"JavaScript","readme":"# css-layer-tree\n\nLay out the composition of your CSS `@layer` architecture. See which layers are used, where they are defined and how they are nested.\n\n## Installation\n\n```\nnpm install @projectwallace/css-layer-tree\n```\n\n## Usage\n\n```js\nimport { layer_tree } from '@projectwallace/css-layer-tree'\n\nlet css = `\n@import url(\"test.css\") layer;\n@import url(\"test.css\") LAYER(test);\n@layer anotherTest {\n\t@layer moreTest {\n\t\t@layer deepTest {}\n\t}\n};\n/* anonymous @layer */\n@layer {}\n`\n\nlet tree = layer_tree(css)\n```\n\nThis example would result in this `tree`:\n\n```js\n;[\n\t{\n\t\tname: '__anonymous-1__',\n\t\tlocations: [{ line: 2, column: 3, start: 3, end: 33 }],\n\t\tchildren: [],\n\t},\n\t{\n\t\tname: 'test',\n\t\tlocations: [{ line: 3, column: 3, start: 36, end: 72 }],\n\t\tchildren: [],\n\t},\n\t{\n\t\tname: 'anotherTest',\n\t\tlocations: [{ line: 4, column: 3, start: 75, end: 148 }],\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tname: 'moreTest',\n\t\t\t\tlocations: [{ line: 5, column: 4, start: 99, end: 144 }],\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'deepTest',\n\t\t\t\t\t\tlocations: [{ line: 6, column: 5, start: 121, end: 139 }],\n\t\t\t\t\t\tchildren: [],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tname: '__anonymous-2__',\n\t\tlocations: [{ line: 10, column: 3, start: 176, end: 185 }],\n\t\tchildren: [],\n\t},\n]\n```\n\n## Related projects\n\n- [Online CSS Layers visualizer](https://www.projectwallace.com/css-layers-visualizer) - See this library in action online!\n- [CSS Analyzer](https://github.com/projectwallace/css-analyzer) - The best CSS analyzer that powers all analysis on [projectwallace.com](https://www.projectwallace.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectwallace%2Fcss-layer-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectwallace%2Fcss-layer-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectwallace%2Fcss-layer-tree/lists"}