/* reset stuff */ div.gallery { background: none !important; border: none !important; margin: 0; padding: 0; max-width: 100%; } details.lightbox { background: none; border: none; margin: unset; padding: unset; box-shadow: none; max-width: unset; } details.lightbox:before { display: none; height: 0; width: 0; margin: 0; border: none; box-shadow: none; } details.lightbox summary { background: none; display: list-item; } details.lightbox summary:before { content: ""; } /* the actual lightbox + gallery code */ details.lightbox { display: inline-block; } details.lightbox summary { cursor: pointer; list-style-type: none; } div.gallery details.lightbox summary { height: 100px; width: 100px; } div.gallery details.lightbox summary img { object-fit: cover; width: 100%; height: 100%; } details.lightbox > img { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 95vw; max-height: 95vh; z-index: 5; } details.lightbox[open] summary, div.gallery details.lightbox[open] summary { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); cursor: unset; } details.lightbox[open] summary img { display: none; } body:has(details.lightbox[open]) { overflow: hidden; }