img.lightbox[data-light-box-id] { cursor: pointer; } [data-light-box-wrapper-id] { background-color: #0b0704; position: fixed; top: 0; left: 0; height: 100%; width: 100%; display: flex; justify-content: center; align-items: center; } [data-light-box-wrapper-id] img { padding: 1rem; max-height: calc(100% - 50px); max-width: calc(100% - 50px); }