Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z-index guidelines #4407

Open
myrta2302 opened this issue Jan 9, 2025 · 2 comments
Open

Z-index guidelines #4407

myrta2302 opened this issue Jan 9, 2025 · 2 comments
Assignees

Comments

@myrta2302
Copy link
Contributor

myrta2302 commented Jan 9, 2025

z-index variables:

In the styles\src\variables_commons.scss file we have:

$zindex-spinner: 990 !default;
$zindex-dropdown: 1000 !default; (top layer)
$zindex-sticky: 1020 !default;
$zindex-fixed: 1030 !default;
$zindex-modal-backdrop: 1040 !default; (top layer backdrop)
$zindex-modal: 1055 !default; (top layer)
$zindex-popover: 1060 !default; (top layer)
$zindex-tooltip: 1070 !default; (top layer)
$zindex-alert: 1080 !default; (top layer)
$zindex-header: 1090 !default;
...

Header z-index has been set so far with the custom property --header-z-index, usually with a default value of 10 (same value as post.ch header's z-index).

  1. Are there any general design guidelines for z-index?
  2. Should we have tokens for default z-index values?
  3. Cleanup of non used z-indices (e.g. #toplayer elements)
  4. Documentation needed?
@myrta2302 myrta2302 added the needs: 💬 pattern discussion This issue will be discussed in the next Pattern Discussion meeting. label Jan 9, 2025
@oliverschuerch oliverschuerch added needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers and removed needs: 💬 pattern discussion This issue will be discussed in the next Pattern Discussion meeting. labels Jan 14, 2025
@oliverschuerch
Copy link
Contributor

We will not create any tokens for this.

@leagrdv leagrdv self-assigned this Jan 16, 2025
@gfellerph
Copy link
Member

Resolution: Create demo page to identify problematic use cases where two elements try to be on the top layer (open dialog with toast message) and try to figure out how we can control which takes precedence. Also, confirm with an example if e.g. dropdowns or tooltips work in an open dialog in the top layer.

@gfellerph gfellerph removed the needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 Triage
Development

No branches or pull requests

4 participants