Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Loading z-index is higher than slideout panel #474

Open
robbieaverill opened this issue Jul 5, 2021 · 4 comments
Open

Loading z-index is higher than slideout panel #474

robbieaverill opened this issue Jul 5, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@robbieaverill
Copy link
Contributor

image

Looks weird. The panel should be on top.

@kvisca
Copy link
Contributor

kvisca commented Jul 9, 2021

@robbieaverill can we close this based on the interaction on #475?

@robbieaverill
Copy link
Contributor Author

Nah it still needs to be resolved. This screenshot is an example of standard component use from the UI library and it shouldn't overlap like this. I closed #475 because there was a difference of opinion on how to fix this, but haven't spent any time on investigating whether we can remove the z-index from the Loading component yet. I think that's the way forward though - let the implementor decide what z-indexes will work for each use case (if they need to at all)

@ScopeyNZ
Copy link
Contributor

Ultimately we should probably have a documented z-index strategy. Different levels should have different purposes. For example:

  • z-0 (none): Normal content
  • z-10: Sectional loading indicators
  • z-20: Panels and modals
  • z-30: Toasts and banner alerts
  • z-40: Full page loading indicators

We could even rename the z- options in tailwind to be clear on the use of each z index, so you'd do something like @apply z-modal for modals.

@ScopeyNZ
Copy link
Contributor

As Robbie mentioned, sectional loading indicators shouldn't actually have z-index, but it might be a bit of a job to do that, as then the loading indicator MUST appear after the content it overlays in the DOM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants