got annoyed with cohost's lightbox so I made it a bit nicer
has this ever happened to you?

well, I have a userstyle which makes it do this instead:

it also works with multi-image posts, and lets the next/previous arrows overlap images
/* ==UserStyle==
@name cohost lightbox tweaks
@author Jessica Stokes
@version 1.0.0
@namespace net.jessicastokes
@preprocessor less
==/UserStyle== */
@-moz-document domain("cohost.org")
{
#lightbox-container > div.backdrop-blur > div.container {
margin-top: 0;
margin-bottom: 0;
padding-top: 2rem;
padding-bottom: 2rem;
overflow-y: auto;
& > div.h-full {
height: auto;
}
/* cap height at 1 browser height minus the padding we use above */
img {
max-height: calc(100vh - 4rem);
}
/* "if there's more than one image" shorthand hack */
&:has(div.items-center > div.items-center:nth-child(2)) {
img {
max-height: calc(100vh - 4rem - 64px - 2rem);
}
/* let the next/previous buttons overlap the image */
& > div > div.grid {
display: flex;
justify-content: center;
> svg {
position: absolute;
&:first-child {
left: 0;
}
&:last-child {
right: 0;
}
}
}
}
}
}
I'm not sure what other userstyle add-ons allow using less, but I'm using Cascadea for Safari