material-components / material-components/material-web
z-index management and isolation
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 11.3k
- Forks
- 1.1k
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 13
Description
I noticed there are some arbitrary z-index values hard-coded throughout the lib i.e. here:
https://github.com/material-components/material-web/blob/7368e2a2e23cd4509e27860ef513dd6fc832964a/menu/lib/_menu.scss#L66
Feel like this should be managed by a CSS var at the least. But y'all should consider implementing some small system to manage z-indicies. Otherwise it will lead to pain down the line, and be hard to work around for consumers.
[Also I would prefer `isolation: isolate;`](https://developer.mozilla.org/en-US/docs/Web/CSS/isolation) to using `z-index: 0;` if you can get away with it, as this isolates the stacking context without having the side effect of changing the actual `z-index`.
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 menu/lib/_menu.scss at the linked line and locating the other hard-coded z-index values mentioned in the issue. Compare the current z-index usage with CSS custom properties and isolation; the work is done when a documented, consistent management approach is agreed and applied across the affected styles.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, scss
- Domain
- design, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100