Skip to content

feat(design-system): stack overlays on z-index tier tokens [AR-108868] - #907

Open
mmurawski-dn wants to merge 3 commits into
drivenets:mainfrom
mmurawski-dn:drivenets/michal/AR-108868-overlay-z-index-tokens
Open

mmurawski-dn wants to merge 3 commits into
drivenets:mainfrom
mmurawski-dn:drivenets/michal/AR-108868-overlay-z-index-tokens

Conversation

@mmurawski-dn

@mmurawski-dn mmurawski-dn commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Overriding a --z-index-* tier token on :root now moves the design-system overlays with it, so apps can restack them without reading the compiled CSS. Part 2 of 3 of AR-108868; part 1 (#882) added the tokens.

Changes

  • DsModal, DsDialog, DsDrawer, DsTooltip and DsChipGroup read their tier token.
  • The shared dropdown styles read --z-index-dropdown, so DsSelect, DsDropdownMenu, DsDatePicker, DsTimePicker, DsDateInput, DsTree and the DsTable menus follow it, keeping their offsets (submenus, time picker, drag layer, row-action tooltip).
  • No tier value changes: every computed z-index is the same with the tokens at their defaults.
  • Guidelines / Z-index lists who reads each tier and the offsets.

Screenshots

At the defaults every stack looks the same before and after (byte-identical captures). The last row sets --z-index-dropdown: 1100 on :root: on main it does nothing; with this PR the menu drops under the modal.

Before After
before, menu open over a modal after, identical
before, nested submenus open after, identical
before, time picker over the calendar after, identical
before, row-action menu with its tooltip after, identical
before, --z-index-dropdown: 1100 has no effect, menu stays over the modal after, --z-index-dropdown: 1100 puts the menu under the modal and backdrop

Notes for reviewers

  • Browser tests pin each overlay's default z-index and check that overriding its tier moves it.
  • DsTable row-action tooltips use max(--z-index-tooltip, --z-index-dropdown + 2), so they follow the tooltip tier too.
  • $dropdown-z-index stays a number because src/styles ships as raw styles; a z-index($offset) function in _dropdown.scss returns the token-based value.
  • Drawer backdrop is the drawer tier minus 200 (1000 by default), not minus 1, so its default doesn't change.
  • Not migrated yet, need a decision on new tiers: DsToast (Ark sets --z-index per toast), DsMainMenu (1000, a layout surface) and the comment bubble/card menus pinned at 1300.

@netlify

netlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

👷 Deploy request for drivenets-design-system pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 883a8f0

…-108868-overlay-z-index-tokens

# Conflicts:
#	packages/design-system/src/components/ds-table/__tests__/ds-table-columns.browser.test.tsx

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant