Skip to content

Commit

Permalink
refactor: removed unnecesary z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenbupe committed Aug 15, 2024
1 parent de6f581 commit 50ddb0b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/components/ExpandableHoloJobCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ export function ExpandableHoloJobCard({
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
className="fixed inset-0 bg-card/20 h-full w-full z-10 backdrop-blur-md"
className="fixed inset-0 bg-card/20 h-full w-full z-[1] backdrop-blur-md"
/>
)}
</AnimatePresence>
<AnimatePresence>
{active && typeof active === "object" ? (
<div className="fixed inset-0 grid place-items-center z-[100]">
<div className="fixed inset-0 grid place-items-center z-[1]">
<motion.div
layoutId={`card-${active.id}-${id}`}
ref={ref}
Expand Down
2 changes: 1 addition & 1 deletion src/components/FlipWords.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const FlipWords = ({
position: "absolute",
}}
className={cn(
"z-10 inline-block relative text-left px-2",
"inline-block relative text-left px-2",
className
)}
key={currentWord}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MeteorAnimation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const meteors = [...new Array(number)].map(() => ({
)}
style={style}
>
<div class="pointer-events-none absolute top-1/2 -z-10 h-px w-[50px] -translate-y-1/2 bg-gradient-to-r from-slate-500 to-transparent" />
<div class="pointer-events-none absolute top-1/2 -z-[1] h-px w-[50px] -translate-y-1/2 bg-gradient-to-r from-slate-500 to-transparent" />
</span>
))
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Pin3d.astro
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const { href, title, className, containerClassName } = Astro.props;
)}
>
<span
class="relative z-20 text-white text-xs font-bold inline-block py-0.5"
class="relative text-white text-xs font-bold inline-block py-0.5"
>
{title}
</span>
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const { title } = Astro.props;
<body
class="relative w-full flex flex-col selection:bg-foreground selection:text-background"
>
<Header class="z-10" />
<main class="w-full flex flex-col items-center">
<Header class="z-[1]" />
<main class="relative w-full flex flex-col items-center">
<Spotlight
class="left-0 md:left-40 max-w-[90%] top-[30vh] h-[100vh]"
fill="#d1d1d1"
Expand Down
9 changes: 4 additions & 5 deletions src/sections/Contact.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ import { mailUrl } from "../constants/site";
id="jobs"
class="py-24 h-full flex flex-col justify-center items-center"
>
<div
class="absolute inset-0 w-full h-full bg-background z-20 [mask-image:radial-gradient(transparent,white)] pointer-events-none"
>
</div>

<h2
class="relative text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl text-center"
>
Expand All @@ -41,6 +36,10 @@ import { mailUrl } from "../constants/site";
<Anchor size="default" href={mailUrl} target="_blank" class="mt-8">
Get in touch
</Anchor>
<div
class="absolute inset-0 w-full h-full bg-background [mask-image:radial-gradient(transparent,white)] pointer-events-none"
>
</div>
</Section>
<p class="relative mt-auto mb-2 text-center text-foreground/80 text-xs">
© {new Date().getFullYear()} Rubén Buzón.
Expand Down
3 changes: 1 addition & 2 deletions src/sections/Projects.astro
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ const projects = [
</div>
<div
class={cn(
"relative w-full aspect-video p-8 overflow-hidden",
project.feature ? "" : ""
"relative w-full aspect-video p-8 overflow-hidden"
)}
>
<div class="absolute inset-8 bg-foreground/20 group-hover:translate-x-2 group-hover:translate-y-2 transition-all duration-500 ease-in-out group-hover:[box-shadow:inset_0_0_10px_0_rgba(255,255,255,0.2)]" />
Expand Down

0 comments on commit 50ddb0b

Please sign in to comment.