1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-05 20:15:31 -04:00

fix menu shifting in safari

This commit is contained in:
2025-05-21 08:12:31 -04:00
parent f35f775702
commit fd7673c8c5
5 changed files with 385 additions and 368 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ const MenuItem = ({
aria-label={text}
data-current={current || undefined}
className={cn(
"text-foreground/85 hover:border-ring data-current:border-primary/40! inline-flex items-center hover:border-b-[3px] hover:no-underline data-current:border-b-[3px]",
"text-foreground/85 hover:border-ring data-current:border-primary/40! inline-flex items-center border-b-3 border-b-transparent hover:no-underline",
className
)}
{...rest}
+4 -1
View File
@@ -44,7 +44,10 @@ const Menu = ({ className, ...rest }: React.ComponentProps<"div">) => {
const isCurrent = item.href?.split("/")[1] === segment;
return (
<div className="mt-[3px] inline-block last:-mr-2.5 max-sm:first:hidden [&_a,&_button]:p-2.5" key={index}>
<div
className="inline-block border-t-3 border-t-transparent last:-mr-2.5 max-sm:first:hidden [&_a,&_button]:p-2.5"
key={index}
>
<MenuItem {...item} current={isCurrent} />
</div>
);