Files
hwilliams-dev/styles/gallery.css

80 lines
1.8 KiB
CSS

.gallery-full-screen-portal {
transition: all 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
opacity: 0;
}
.gallery-action-button {
position: absolute;
cursor: pointer;
display: flex;
padding: 0;
}
.gallery-action-button button {
width: 28px;
height: 28px;
display: flex;
border-radius: var(--radius-sm);
border: 1px solid var(--accent);
background-color: var(--surface);
align-items: center;
justify-content: center;
color: var(--fg);
z-index: 1001;
cursor: pointer;
transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
/* `.is-hovered` is set while the media itself is hovered, so the button shows
the same state as a direct hover on it. */
.gallery-action-button button:hover,
.gallery-action-button.is-hovered button {
filter: brightness(120%);
border-color: var(--accent-hover);
background-color: var(--surface-hover);
}
.gallery-thumb {
position: relative;
display: block;
padding: 0;
border: none;
background: none;
cursor: pointer;
pointer-events: auto;
box-shadow: var(--shadow-sm);
}
.gallery-thumb img {
display: block;
margin: 0;
}
/* Hover hint that clicking a thumbnail shows it in the main display. The
active thumbnail is already there, so it gets no hint. */
.gallery-thumb-magnifier {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
color: #fff;
background: rgba(0, 0, 0, 0.45);
opacity: 0;
pointer-events: none;
transition: opacity 0.15s ease;
}
.gallery-thumb:not(.is-active):hover .gallery-thumb-magnifier,
.gallery-thumb:not(.is-active):focus-visible .gallery-thumb-magnifier {
opacity: 1;
}
.action-button-svg {
stroke: var(--fg-secondary);
}
@media (max-width: 768px) {
.project-card {
height: 100%;
max-height: 80vh;
}
}