Skip to content

Commit 37ca58b

Browse files
committed
refactor: unify z-index with hope ui css var
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
1 parent 162ac12 commit 37ca58b

7 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/components/Base.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const BoxWithFullScreen = (props: Parameters<typeof Box>[0]) => {
106106
h={isOpen() ? "100vh" : props.h}
107107
top={0}
108108
left={0}
109-
zIndex={1}
109+
zIndex="$overlay"
110110
transition="all 0.2s ease-in-out"
111111
css={{
112112
backdropFilter: isOpen() ? "blur(5px)" : undefined,
@@ -122,7 +122,7 @@ export const BoxWithFullScreen = (props: Parameters<typeof Box>[0]) => {
122122
_hover={{ opacity: "1" }}
123123
transition="opacity 0.3s ease"
124124
pointerEvents="auto"
125-
zIndex="$sticky"
125+
zIndex="$docked"
126126
>
127127
<Show when={!isNativeFullscreen()}>
128128
{/* Full view toggle */}

src/components/EncodingSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function EncodingSelect(props: {
8080
_hover={{
8181
opacity: 1,
8282
}}
83-
zIndex={1}
83+
zIndex="$docked"
8484
>
8585
<SelectWrapper
8686
options={encodingLabels.map((label) => ({

src/components/SwitchLanguage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const SwitchLanguage = <C extends ElementType = "button">(
5959
pos="fixed"
6060
top={0}
6161
bg={useColorModeValue("$blackAlpha4", "$whiteAlpha4")()}
62-
zIndex="9000"
62+
zIndex="$notification"
6363
>
6464
<Spinner
6565
thickness="4px"

src/pages/home/previews/image.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ const Preview = (props: PreviewProps) => {
305305
position={isFullscreen() ? "absolute" : "relative"}
306306
top={isFullscreen() ? "0" : undefined}
307307
left={isFullscreen() ? "0" : undefined}
308-
zIndex="10"
308+
zIndex="$docked"
309309
css={{
310310
"backdrop-filter": "blur(8px)",
311311
}}
@@ -451,7 +451,7 @@ const Preview = (props: PreviewProps) => {
451451
p="$2"
452452
bg={alphaBgColor()}
453453
borderRadius="$md"
454-
zIndex="10"
454+
zIndex="$docked"
455455
fontSize="$sm"
456456
css={{
457457
"backdrop-filter": "blur(2px)",

src/pages/home/toolbar/Right.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const Right = () => {
3030
pos="fixed"
3131
right={margin()}
3232
bottom={margin()}
33+
zIndex="$modal"
3334
>
3435
<Show
3536
when={isOpen()}

src/pages/login/LoginBg.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const LoginBg = () => {
1111
top="0"
1212
left="0"
1313
overflow="hidden"
14-
zIndex="-1"
14+
zIndex="$hide"
1515
w="100vw"
1616
h="100vh"
1717
>

src/pages/login/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const Login = () => {
225225
}
226226

227227
return (
228-
<Center zIndex="1" w="$full" h="100vh">
228+
<Center zIndex="$docked" w="$full" h="100vh">
229229
<VStack
230230
bgColor={bgColor()}
231231
rounded="$xl"

0 commit comments

Comments
 (0)