Ajust lightbox
This commit is contained in:
100
style.css
100
style.css
@@ -210,11 +210,22 @@ html.luxtools-noscroll body {
|
||||
padding: 0.8em;
|
||||
}
|
||||
|
||||
.luxtools-lightbox img.luxtools-lightbox-img {
|
||||
.luxtools-lightbox .luxtools-lightbox-media {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.luxtools-lightbox img.luxtools-lightbox-img {
|
||||
display: block;
|
||||
/* Use viewport constraints so tall images always fit.
|
||||
* Percent max-height is unreliable here because the wrapper doesn't have a fixed height.
|
||||
*/
|
||||
max-width: calc(100vw - 1.6em);
|
||||
max-height: calc(100vh - 1.6em);
|
||||
}
|
||||
|
||||
.luxtools-lightbox .luxtools-lightbox-caption {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -230,64 +241,67 @@ html.luxtools-noscroll body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Top-left "open in new tab" button. */
|
||||
.luxtools-lightbox button.luxtools-lightbox-opennew {
|
||||
left: 0.6em;
|
||||
top: 0.6em;
|
||||
bottom: auto;
|
||||
width: 2.4em;
|
||||
height: 2.4em;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 0.2em;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
|
||||
.luxtools-lightbox button.luxtools-lightbox-btn {
|
||||
/* Image-anchored prev/next zones.
|
||||
* These are sized relative to the displayed image (not the viewport) and show
|
||||
* a subtle indicator only on hover/focus.
|
||||
*/
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Navigation: transparent left/right tap zones (default everywhere). */
|
||||
.luxtools-lightbox button.luxtools-lightbox-prev,
|
||||
.luxtools-lightbox button.luxtools-lightbox-next {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 30%;
|
||||
width: 25%;
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font-size: 2em;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.luxtools-lightbox button.luxtools-lightbox-prev {
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone-prev {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.luxtools-lightbox button.luxtools-lightbox-next {
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone-next {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* Close button overlays content. */
|
||||
.luxtools-lightbox button.luxtools-lightbox-close {
|
||||
top: 0.6em;
|
||||
right: 0.6em;
|
||||
width: 2.2em;
|
||||
height: 2.2em;
|
||||
background: transparent;
|
||||
border: none;
|
||||
z-index: 2;
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone::after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 3em;
|
||||
line-height: 1;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
min-height: 1.1em;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
border: 1px solid rgba(255, 255, 255, 0.25);
|
||||
border-radius: 999px;
|
||||
padding: 0 0.28em;
|
||||
text-shadow: 0 0 0.4em rgba(0, 0, 0, 0.9);
|
||||
opacity: 0;
|
||||
transition: opacity 120ms ease-in-out;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone-prev::after {
|
||||
content: '‹';
|
||||
left: 0.35em;
|
||||
}
|
||||
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone-next::after {
|
||||
content: '›';
|
||||
right: 0.35em;
|
||||
}
|
||||
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone:hover::after,
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone:focus-visible::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.luxtools-lightbox button.luxtools-lightbox-prev,
|
||||
.luxtools-lightbox button.luxtools-lightbox-next {
|
||||
font-size: 1.6em;
|
||||
.luxtools-lightbox button.luxtools-lightbox-zone::after {
|
||||
font-size: 2.4em;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user