backsplash-app
Version:
An AI powered wallpaper app.
146 lines (118 loc) • 2.83 kB
CSS
@tailwind base;
@tailwind components;
@tailwind utilities;
body {
height: 100dvh;
}
#root {
height: 100%
}
/* Page animation CSS */
.page {
height: calc(100% - 2.5rem);
width: 100%;
position: absolute;
}
.page-enter {
opacity: 0;
/* transform: translateX(100%); */ /* Remove transform for dissolve */
}
.page-enter-active {
opacity: 1;
/* transform: translateX(0); */ /* Remove transform for dissolve */
transition: opacity 300ms ease-in-out; /* Use only opacity transition */
}
.page-exit {
opacity: 1;
/* transform: translateX(0); */ /* Remove transform for dissolve */
}
.page-exit-active {
opacity: 0;
/* transform: translateX(-100%); */ /* Remove transform for dissolve */
transition: opacity 300ms ease-in-out; /* Use only opacity transition */
}
::-webkit-scrollbar-track {
background: transparent;
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: #626c79; /* medium gray for the scrollbar thumb */
border-radius: 4px;
transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
background: #6b7280; /* lighter gray on hover */
}
/* For Firefox */
* {
scrollbar-width: thin;
scrollbar-color: #626c79 transparent;
}
/* --- Icon Hover Animations --- */
/* 1. Expand (Image) */
@keyframes expand {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.2); }
}
/* 2. Jiggle (Paintbrush) */
@keyframes jiggle {
0%, 100% { transform: rotate(0deg); }
25% { transform: rotate(-8deg); }
50% { transform: rotate(8deg); }
75% { transform: rotate(-6deg); }
}
/* 3. Shrink/Grow (Clock) */
@keyframes shrink-grow {
0%, 100% { transform: scale(1); }
50% { transform: scale(0.8); }
}
/* 4. Spin (Gear) */
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* Apply animations to specific nav icons on hover */
.menu-item:nth-child(1) a:hover svg {
animation: expand 0.3s ease-in-out;
}
.menu-item:nth-child(2) a:hover svg {
animation: jiggle 0.4s ease-in-out;
}
.menu-item:nth-child(3) a:hover svg {
animation: shrink-grow 0.3s ease-in-out;
}
.menu-item:nth-child(4) a:hover svg {
animation: spin 0.5s linear;
}
/* General styling to prevent layout shift (optional but good practice) */
.menu-item svg {
display: inline-block; /* Prevents potential inline issues */
transform-origin: center center; /* Ensures transforms originate correctly */
}
/* Toast animations */
@keyframes enter {
0% {
transform: translateY(-16px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
@keyframes leave {
0% {
transform: translateY(0);
opacity: 1;
}
100% {
transform: translateY(-16px);
opacity: 0;
}
}
.animate-enter {
animation: enter 0.3s ease-out;
}
.animate-leave {
animation: leave 0.3s ease-in forwards;
}