Files
web/packages/design-system/lib/components/Lightbox/FullView/fullView.module.css
Matilda Landström fc857ad58f Merged in SW-2064-lightbox-updates (pull request #3347)
feat(SW-2064): Lightbox updates

* chore(SW-2064): add opacity to not selected images

* chore(SW-2064): set main image as the first image in thumbnail

* chore(SW-2064): disable navigation buttons on first and last image

* fix(SW-2064): use cx

* Revert "chore(SW-2064): disable navigation buttons on first and last image"

This reverts commit 9c5acd8a02b83740f35d1cfa88bfba6b006ba947.

* refactor(SW-2064): create ImageCounter component

* refactor(SW-2064)

* chore(SW-2064): add enter keu down on main image


Approved-by: Erik Tiekstra
2026-01-08 12:10:03 +00:00

99 lines
1.8 KiB
CSS

.fullView {
background-color: var(--UI-Text-High-contrast);
width: 100%;
height: 100%;
padding: var(--Space-x3) var(--Space-x2);
position: relative;
align-items: center;
justify-items: center;
display: grid;
grid-template-rows: auto 1fr;
grid-template-columns: 1fr;
place-content: center;
gap: var(--Space-x5);
}
.closeButton {
position: absolute;
top: var(--Space-x2);
right: var(--Space-x2);
z-index: 1;
}
.header {
display: flex;
justify-content: center;
width: 100%;
}
.content {
position: relative;
width: 100%;
height: 100%;
}
/* This container needs to be absolutely positioned because otherwise the animation won't work correctly */
.motionContainer {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
}
.imageWrapper {
position: relative;
display: flex;
flex-direction: column;
gap: var(--Space-x2);
align-items: center;
justify-content: center;
width: min(1454px, 100%);
height: min(1454px, 100%);
}
.image {
object-fit: contain;
border-radius: var(--Corner-radius-Medium);
/* Override Next.js Image styles, we can't set width/height on the image as we don't know the aspect ratio of the image */
width: auto !important;
height: auto !important;
position: relative !important;
max-width: 100%;
max-height: 100%;
}
.caption {
color: var(--Text-Inverted);
}
@media screen and (max-width: 767px) {
.navigationButton {
display: none;
}
}
@media screen and (min-width: 768px) {
.fullView {
padding: var(--Space-x5);
}
.closeButton {
top: var(--Space-x4);
right: var(--Space-x4);
}
.navigationButton {
position: absolute;
top: 50%;
transform: translateY(-50%);
&.next {
right: var(--Space-x5);
}
&.prev {
left: var(--Space-x5);
}
}
}