-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ENG-813): stack the consent banner behind all modals
this adds a constant that ensures that the consent banner (and other future banners) will be stacked behind all modals. hopefully this approach will help future visitors to the file from regressing this issue since the constants will reveal the intent.
- Loading branch information
Showing
4 changed files
with
28 additions
and
7 deletions.
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
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 |
---|---|---|
@@ -1,11 +1,18 @@ | ||
// For help with defining z-index values, refer to this article: | ||
// https://www.smashingmagazine.com/2021/02/css-z-index-large-projects/#a-new-solution | ||
const behind = -1; | ||
const modalDialog = 300; | ||
const banner = behind + modalDialog; | ||
|
||
export const oakZIndexTokens = { | ||
behind: -1, | ||
behind, | ||
neutral: 0, | ||
"in-front": 1, | ||
"mobile-filters": 2, | ||
"fixed-header": 100, | ||
"modal-close-button": 150, | ||
"modal-dialog": 300, | ||
}; | ||
"modal-dialog": modalDialog, | ||
banner, | ||
} as const; | ||
|
||
export type OakZIndexToken = keyof typeof oakZIndexTokens | null; |