add grain to gradients

This commit is contained in:
VDawg 2023-11-15 21:58:11 +01:00
parent 9733b239fd
commit c547e48929
8 changed files with 62 additions and 16 deletions

View file

@ -106,6 +106,8 @@
width: 100%; width: 100%;
height: 900px; height: 900px;
z-index: -10; z-index: -10;
background: radial-gradient(105vw 450px at 50% 50%, theme(colors.blue.600 / 80%), transparent); mask-image: radial-gradient(105vw 450px at 50% 50%, rgba(0, 0, 0, 1) 50%, transparent);
background: url('imgs/grain.webp'),
radial-gradient(105vw 450px at 50% 50%, theme(colors.blue.600 / 80%), transparent);
} }
</style> </style>

View file

@ -199,12 +199,22 @@
} }
.top-light { .top-light {
background: radial-gradient( background: url('imgs/grain.webp'),
radial-gradient(
100% 80% at top,
theme(colors.cyan.500 / 50%) 0%,
theme(colors.sky.500 / 20%),
transparent
);
mask-image: radial-gradient(
100% 80% at top, 100% 80% at top,
theme(colors.cyan.500 / 50%) 0%, white,
theme(colors.sky.500 / 20%), rgba(0, 0, 0, 1),
rgba(0, 0, 0, 1),
transparent transparent
); );
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;

View file

@ -140,10 +140,15 @@
width: 1100px; width: 1100px;
height: 200%; height: 200%;
background-image: radial-gradient( background-image: url('imgs/grain.webp'),
radial-gradient(closest-side, theme(colors.sky.500), theme(colors.indigo.500 / 0%));
mask-image: radial-gradient(
closest-side, closest-side,
theme(colors.sky.500), white,
theme(colors.indigo.500 / 0%) rgba(0, 0, 0, 1),
rgba(0, 0, 0, 1) 90%,
transparent
); );
} }
</style> </style>

View file

@ -58,8 +58,10 @@
width: 200vw; width: 200vw;
max-width: 2400px; max-width: 2400px;
max-height: 1000px; max-height: 1000px;
background: radial-gradient(closest-side, theme(colors.blue.500 / 30%), transparent), background: url('imgs/grain.webp'),
radial-gradient(closest-side, theme(colors.blue.500 / 30%), transparent),
radial-gradient(15% 20%, theme(colors.cyan.500 / 70%), transparent); radial-gradient(15% 20%, theme(colors.cyan.500 / 70%), transparent);
mask-image: radial-gradient(closest-side, white, rgba(0, 0, 0, 0.8) 70%, transparent);
} }
.glow { .glow {
@ -72,11 +74,13 @@
left: 0; left: 0;
right: 0; right: 0;
pointer-events: none; pointer-events: none;
background-image: radial-gradient( background-image: url('imgs/grain.webp'),
ellipse at bottom, radial-gradient(
theme(colors.pink.400), ellipse at bottom,
theme(colors.indigo.700 / 50%) 50%, theme(colors.pink.400),
theme(colors.indigo.950 / 0%) 80% theme(colors.indigo.700 / 50%) 50%,
); theme(colors.indigo.950 / 0%) 80%
);
mask-image: radial-gradient(ellipse at bottom, white, rgba(0, 0, 0, 1) 90%, transparent);
} }
</style> </style>

View file

@ -37,6 +37,7 @@
{/each} {/each}
</div> </div>
</div> </div>
<div class="gradient_" />
<Title> <Title>
<span slot="title" class="title">Wall of fame</span> <span slot="title" class="title">Wall of fame</span>
<div slot="subtitle" class="max-w-[40ch]"> <div slot="subtitle" class="max-w-[40ch]">
@ -143,7 +144,15 @@
max-height: 900px; max-height: 900px;
width: 100%; width: 100%;
margin-bottom: min(-10vh, -6rem); margin-bottom: min(-10vh, -6rem);
background: radial-gradient(70% 50% at 50% 0%, theme(colors.cyan.500 / 50%), transparent); }
.gradient_ {
position: absolute;
inset: 0;
z-index: -1000;
mask-image: radial-gradient(70% 50% at 50% 0%, white 70%, transparent);
background: url('imgs/grain.webp'),
radial-gradient(70% 50% at 50% 0%, theme(colors.cyan.500 / 40%), transparent);
} }
.japanese { .japanese {

View file

@ -101,7 +101,8 @@
width: 100%; width: 100%;
height: 1000px; height: 1000px;
z-index: -10; z-index: -10;
background: radial-gradient(140px 100px at 50% 45%, var(--color), transparent), background: url('imgs/grain.webp'),
radial-gradient(140px 100px at 50% 45%, var(--color), transparent),
radial-gradient(145px 110px at 50% 45%, var(--c1), transparent), radial-gradient(145px 110px at 50% 45%, var(--c1), transparent),
radial-gradient(210px 140px, var(--c2, theme(colors.blue.600)), transparent), radial-gradient(210px 140px, var(--c2, theme(colors.blue.600)), transparent),
radial-gradient(300px 200px, var(--c2, theme(colors.sky.600)), transparent), radial-gradient(300px 200px, var(--c2, theme(colors.sky.600)), transparent),

View file

@ -54,6 +54,7 @@
alt={`${name} by ${creator} thumbnail`} alt={`${name} by ${creator} thumbnail`}
loading="lazy" loading="lazy"
/> />
<div class="grain_" />
</div> </div>
</div> </div>
@ -110,4 +111,18 @@
mask-image: radial-gradient(farthest-side, black, transparent); mask-image: radial-gradient(farthest-side, black, transparent);
} }
.grain_ {
position: absolute;
min-width: calc(120% + 200px);
height: calc(120% + 200px);
top: -45%;
left: 50%;
translate: -50%;
z-index: -5;
contain: layout size style paint;
background-blend-mode: hard-light;
mask-image: radial-gradient(farthest-side, black 50%, transparent);
background-image: url('imgs/grain.webp');
}
</style> </style>

BIN
static/imgs/grain.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB