Skip to content

feat(ui): z-index mini framework via Tailwind custom tiers#8270

Open
enkr1 wants to merge 1 commit intoCoursemology:masterfrom
enkr1:feat/z-index-framework
Open

feat(ui): z-index mini framework via Tailwind custom tiers#8270
enkr1 wants to merge 1 commit intoCoursemology:masterfrom
enkr1:feat/z-index-framework

Conversation

@enkr1
Copy link

@enkr1 enkr1 commented Mar 21, 2026

Addresses #5397

Problem

20+ hardcoded z-index values scattered across the codebase with no convention — values range from 1 to 9999 with no semantic meaning or hierarchy.

Changes

Tailwind z-index tiers (tailwind.config.ts)

Tier Class Value Usage
base z-base 1 Base layer elements
badge z-badge 3 Badges, icons overlaying content
sticky z-sticky 100 Sticky headers, controls
overlay z-overlay 110 Loading overlays
dropdown z-dropdown 1000 Menus, popovers, floating controls
modal z-modal 9999 Dialogs, notifications — always on top

Migrated components

  • NotificationBar9999z-modal
  • ConfirmationDialog9999z-modal
  • LoadingOverlay110z-overlay
  • ZoomActionElements999z-dropdown
  • Dashboard (learning map) — 999z-dropdown
  • UnpublishedIcon3z-badge

Not migrated (intentionally)

  • CKEditor CSS (z-index: 1500) — third-party DOM, can't use Tailwind classes
  • Learning map Node/Gate — dynamic z-index computed from node.depth, must stay inline
  • ScribingView fields — string '1' values in inline styles, minor cleanup for a follow-up
  • WideComments — dynamic z-index based on line numbers

Reference

Smashing Magazine: Z-Index for Large Projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant