-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Tayyaba Taimur <[email protected]> Co-authored-by: Josh Wooding <[email protected]>
- Loading branch information
1 parent
d40c435
commit ef0631d
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Z-Index | ||
layout: DetailTechnical | ||
sidebar: | ||
priority: 4 | ||
--- | ||
|
||
Z-index is a CSS property that controls how elements stack on top of each other. The stack order is defined by an element with a higher z-index appearing on top of an element with a lower z-index. | ||
|
||
Z-index and shadow are used together to help distinguish each layer in the stack. Shadow provides the visual element and z-index provides the structural element. Please refer to the [shadow](/salt/foundations/shadow) foundation page if you're using z-index. | ||
|
||
## Z-Index ramp | ||
|
||
Salt provides z-index tokens that determine an item’s position in the layering order. By providing consistent z-indexes, the design system ensures a predictable hierarchy of visual elements when stacked on top of one another. | ||
|
||
<Image | ||
src="/img/foundations/z-index.png" | ||
alt="Diagram showing a stack of elements to show how Z-index layers items." | ||
/> | ||
|
||
| Token | Value | | ||
| ---------------------- | ----- | | ||
| `-zIndex-default` | 1 | | ||
| `-zIndex-appHeader` | 1000 | | ||
| `-zIndex-drawer` | 1200 | | ||
| `-zIndex-modal` | 1300 | | ||
| `-zIndex-notification` | 1400 | | ||
| `-zIndex-dragObject` | 1420 | | ||
| `-zIndex-contextMenu` | 1450 | | ||
| `-zIndex-flyover` | 1500 | | ||
|
||
:fragment{src="../fragments/feedback.mdx"} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.