[css-cascade-5] Do we need an API that lists the cascade layers in a tree scope?
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 24
Description
It might be useful if there is an API that returns all the cascade layers of a tree scope as a sorted list or a tree. For example, DevTools might need this (source: https://twitter.com/kilianvalkhof/status/1484568350504140804?s=20)
However, for the same purpose, Chrome DevTools doesn't need a public web API. Instead, it retrieves information via Chrome DevTools Protocol, which is also a public API.
So while a layer-listing API seems good on its own, I'm not sure about the exact use cases, and therefore not sure about what the exact result format it should use. (I tried to draft something here)
So I'm opening this issue to collect ideas and see if we should introduce such an API.
@mirisuzanne
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed layer-listing API in the linked gist and the issue's discussion of DevTools use cases and result formats. Compare the public web API idea with Chrome DevTools Protocol. Done means reaching agreement on concrete use cases and whether an API, including its output shape, should be introduced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100