Files
trpic/web/styles/gallery/gallery.css
Hubert Chen d967f4344a maplibre-like image preview
style:
    add `pointer-events: none` to `thumbhash` overlay
    add `sidebar-content` bottom padding
    remove `transition` in `preview-img` to fix flickering
2026-04-24 23:47:02 +08:00

79 lines
1.2 KiB
CSS

#gallery {
display: flex;
flex-wrap: wrap;
}
#gallery::after {
content: '';
flex-grow: 999999999;
min-width: 200px;
height: 0;
}
#gallery div {
position: relative;
margin: .1em;
}
#gallery i {
display: block;
}
#gallery #imgs,
#gallery img {
position: absolute;
top: 0;
height: 100%;
width: 100%;
vertical-align: bottom;
background-color: rgb(50, 50, 50);
}
#gallery a:focus-visible > img,
#gallery img:focus-visible {
outline: .5em solid rgba(0, 0, 0, 0.5);
outline-offset: -.5em;
}
#gallery i span {
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 1.8em);
position: absolute;
pointer-events: none;
width: 100%;
height: 100%;
z-index: 1;
padding: .05em;
}
#gallery i p {
position: absolute;
bottom: 0;
right: 0;
padding: .4em;
margin: 0;
font-size: .8em;
font-style: normal;
line-height: 1em;
overflow: hidden;
color: white;
}
@media (prefers-color-scheme: dark) {
html {
color: white;
}
#gallery #imgs {
mask-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
}
}
#gallery span#deleted {
position: absolute;
top: 0;
}
#gallery #thumbhash {
transition: all ease-in-out .3s;
pointer-events: none;
}