Skip to content

v0.2.45

Choose a tag to compare

@github-actions github-actions released this 08 Feb 12:37
· 484 commits to main since this release
4857d92

v0.2.45 — Dialog stacking no longer uses hardcoded z-index values; stack index metadata is exposed so you can control layering from CSS.

Packages updated

  • @data-slot/dialog

@data-slot/dialog

  • 🐛 Fix: Removed hardcoded inline z-index values — dialogs no longer set style.zIndex on overlay or content.
  • ✨ New: Each dialog now receives stack metadata you can use in CSS: data-stack-index on overlay and content, and these CSS custom properties:
    • --dialog-stack-index
    • --dialog-overlay-stack-index
    • --dialog-content-stack-index
  • Behavior: Stack indices are assigned by position in the internal dialog stack (0, 1, 2, …) and the metadata is cleared when a dialog closes.
  • Example usage: control layering in your stylesheet using the data attribute or CSS vars, e.g.
    /* overlay: increase base z by stack index * 10 */
    .ds-dialog__overlay {
      z-index: calc(1000 + var(--dialog-overlay-stack-index, 0) * 10);
    }
    
    /* content: keep above overlay */
    .ds-dialog__content {
      z-index: calc(1000 + var(--dialog-stack-index, 0) * 10 + 1);
    }
  • 💥 Breaking change: If your app relied on dialogs setting inline z-index styles, update your CSS to use the provided data-stack-index attribute or CSS vars to reproduce previous layering behavior.

Notes

  • This release bumps the monorepo version to v0.2.45; only @data-slot/dialog contains code changes.