-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fix: custom z-index classNames #8395
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,12 +35,12 @@ export interface DialogTitleProps extends React.ComponentProps<typeof BaseDialog | |
| } | ||
|
|
||
| // Constants | ||
| const OVERLAY_CLASSNAME = cn("fixed inset-0 z-backdrop bg-backdrop"); | ||
| const BASE_CLASSNAME = "relative text-left bg-surface-1 rounded-lg shadow-md w-full z-modal border border-subtle"; | ||
| const OVERLAY_CLASSNAME = cn("fixed inset-0 z-90 bg-backdrop"); | ||
| const BASE_CLASSNAME = "relative text-left bg-surface-1 rounded-lg shadow-md w-full z-100 border border-subtle"; | ||
|
|
||
| // Utility functions | ||
| const getPositionClassNames = (position: DialogPosition) => | ||
| cn("isolate fixed z-modal", { | ||
| cn("isolate fixed z-100", { | ||
|
||
| "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2": position === "center", | ||
| "top-8 left-1/2 -translate-x-1/2": position === "top", | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class names
z-90andz-100are not valid Tailwind CSS classes. In Tailwind, arbitrary z-index values should use bracket notation. Based on the rest of the codebase which uses patterns likez-[35],z-[15], etc., these should bez-[90]andz-[100]instead.