Z Index Coordinate Matrix

Replace arbitrary z-index numbers (999, 9999, 99999) with a declared depth matrix — --z-subground (-10), --z-ground (0), --z-rail-sticky (100), --z-navigation (200), --z-disclosure (300), --z-modal (400), --z-critical (500) — plus deliberate stacking contexts (isolation: isolate) at component roots and the browser top layer for dialogs/popovers. Use this whenever writing CSS with position: fixed/sticky/absolute, sticky headers or rails, dropdowns, popovers, tooltips, modals, toasts, overlays, parallax/background layers, or when the user says "z-index", "it's rendering behind/under", "the dropdown is hidden by the next card", "stacking", "overlay order", "the modal is under the header", or any layering bug.

fernandokylas Updated

File contents

fernandokylas/editorial-web-craft/tree/main/skills/z-index-coordinate-matrix commit 53a51a0997

Frequently asked questions

npx skillmds@latest add fernandokylas/z-index-coordinate-matrix