Files
newsletter-hackernews/app/globals.css
2024-01-20 03:00:31 +01:00

157 lines
2.9 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 0 0% 3.9%;
--card: 0 0% 100%;
--card-foreground: 0 0% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 0 0% 3.9%;
--primary: 0 0% 9%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 89.8%;
--input: 0 0% 89.8%;
--ring: 0 0% 3.9%;
--radius: 0.5rem;
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
--card: 0 0% 3.9%;
--card-foreground: 0 0% 98%;
--popover: 0 0% 3.9%;
--popover-foreground: 0 0% 98%;
--primary: 0 0% 98%;
--primary-foreground: 0 0% 9%;
--secondary: 0 0% 14.9%;
--secondary-foreground: 0 0% 98%;
--muted: 0 0% 14.9%;
--muted-foreground: 0 0% 63.9%;
--accent: 0 0% 14.9%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 14.9%;
--input: 0 0% 14.9%;
--ring: 0 0% 83.1%;
}
}
.styledH2 {
@apply text-xl font-bold;
}
.styledH3 {
@apply text-lg font-semibold;
}
.styledH4 {
@apply text-base font-medium;
}
/* Card border gradient */
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #222;
}
.gradient-border {
--radius: 5px;
position: relative;
display: flex;
justify-content: center;
align-items: center;
color: white;
background: #222;
border-radius: var(--radius);
&::after {
position: absolute;
content: '';
top: calc(-1 * var(--radius));
left: calc(-1 * var(--radius));
z-index: -1;
width: calc(100% + var(--radius) * 2);
height: calc(100% + var(--radius) * 2);
background: linear-gradient(
60deg,
hsl(224, 85%, 66%),
hsl(269, 85%, 66%),
hsl(314, 85%, 66%),
hsl(359, 85%, 66%),
hsl(44, 85%, 66%),
hsl(89, 85%, 66%),
hsl(134, 85%, 66%),
hsl(179, 85%, 66%)
);
background-size: 300% 300%;
background-position: 0 50%;
border-radius: calc(2 * var(--radius));
animation: moveGradient 4s alternate infinite;
}
}
@keyframes moveGradient {
50% {
background-position: 100% 50%;
}
}
/* Button gradient */
.btn-grad {
background-image: linear-gradient(
to right,
#da22ff 0%,
#9733ee 51%,
#da22ff 100%
);
padding: 10px;
width: 100%;
text-align: center;
text-transform: uppercase;
transition: 0.5s;
background-size: 200% auto;
color: white;
box-shadow: 0 0 20px #eee;
border-radius: 10px;
display: block;
}
.btn-grad:hover {
background-position: right center;
color: #fff;
text-decoration: none;
}