Skip to content

Commit

Permalink
Remove dvh height for mobile fixed height and screen size
Browse files Browse the repository at this point in the history
  • Loading branch information
grayashh committed Sep 1, 2024
1 parent 3260760 commit 708c2c9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/app/components/Backdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function Backdrop({ children }: { children: React.ReactNode }) {
<>
<div
className={cn(
"bg-gray-4000/50 fixed left-0 top-0 -z-10 flex h-full w-full items-center justify-center transition-colors duration-500",
"bg-gray-4000/50 fixed left-0 top-0 -z-10 flex h-screen w-full items-center justify-center transition-colors duration-500",
inView && "bg-gray-700/80"
)}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Background.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Spline from "@splinetool/react-spline/next";

export default function Background() {
return (
<div className="fixed left-0 top-0 -z-20 flex h-full w-full items-center justify-center bg-scene">
<div className="fixed left-0 top-0 -z-20 flex h-screen w-full items-center justify-center bg-scene">
<Spline scene="/cloud.spline" />
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/HeroSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function HeroSection() {

return (
<motion.section
className="relative h-screen-dvh"
className="relative h-screen"
ref={heroRef}
animate={heroInView && mounted ? "visible" : "hidden"}
variants={{
Expand Down
15 changes: 0 additions & 15 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,5 @@ const config: Config = {
},
},
},
plugins: [
plugin(function ({ addUtilities }) {
addUtilities({
".h-screen-dvh": {
height: ["100vh", "100dvh"],
},
".min-h-screen-dvh": {
minHeight: ["100vh", "100dvh"],
},
".max-h-screen-dvh": {
maxHeight: ["100vh", "100dvh"],
},
});
}),
],
};
export default config;

0 comments on commit 708c2c9

Please sign in to comment.