mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 08:48:47 +01:00
Have a little fun with CSS variables X JS
This commit is contained in:
parent
41df88e625
commit
33176c5ea7
2 changed files with 11 additions and 2 deletions
|
@ -494,6 +494,13 @@ a.mention span {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
|
background-color: var(--average-color-alpha);
|
||||||
|
background-image: radial-gradient(
|
||||||
|
closest-side,
|
||||||
|
var(--average-color) 10%,
|
||||||
|
var(--average-color-alpha) 40%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
.carousel > * :is(img, video) {
|
.carousel > * :is(img, video) {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
|
@ -1326,8 +1326,10 @@ function Carousel({ mediaAttachments, index = 0, onClose = () => {} }) {
|
||||||
<InView
|
<InView
|
||||||
class="carousel-item"
|
class="carousel-item"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor:
|
'--average-color': `rgb(${rgbAverageColor?.join(',')})`,
|
||||||
rgbAverageColor && `rgba(${rgbAverageColor.join(',')}, .5)`,
|
'--average-color-alpha': `rgba(${rgbAverageColor?.join(
|
||||||
|
',',
|
||||||
|
)}, .5)`,
|
||||||
}}
|
}}
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
key={media.id}
|
key={media.id}
|
||||||
|
|
Loading…
Reference in a new issue