Что дополнить или исправить?
Клик за пределами изображения закрывает (уменьшает).
Нужно закрытие (уменьшить), кликнув по изображению.
}
img[tabindex="0"] {
cursor: zoom-in;
}
img[tabindex="0"]:focus {
position: fixed;
z-index: 10;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: auto;
max-width: 100%;
height: auto;
max-height: 100%;
margin: auto;
box-shadow: 0 0 10px #000, 0 0 0 1000px rgba(0,0,0,.8);
-webkit-box-shadow: 0 0 10px #000, 0 0 0 1000px rgba(0,0,0,.8);
-moz-box-shadow: 0 0 10px #000, 0 0 0 1000px rgba(0,0,0,.8);
}
img[tabindex="0"]:focus,
img[tabindex="0"]:focus ~ * {
cursor: zoom-out;
}