Files
web/components/Lightbox/Lightbox.module.css
Niclas Edenvin 0efa52ada5 Merged in feat/sw-587-sidepeek-for-room (pull request #767)
Create the sidepeek for a specific roomtype. This also changes the lightbox to use react-aria instead of radix-ui, so we use the same for the lightbox and the sidepeek. Works better together!


Approved-by: Bianca Widstam
2024-10-25 14:11:06 +00:00

310 lines
5.3 KiB
CSS

@keyframes darken-background {
from {
background-color: rgba(0, 0, 0, 0);
}
to {
background-color: rgba(0, 0, 0, 0.5);
}
}
.mobileGallery {
height: 100%;
position: relative;
display: flex;
flex-direction: column;
gap: var(--Spacing-x2);
}
.mobileGalleryCloseButton {
justify-content: flex-start;
width: fit-content;
}
.mobileGalleryContent {
display: block;
}
.fullViewCloseButton {
position: absolute;
top: var(--Spacing-x-one-and-half);
right: var(--Spacing-x-half);
z-index: 1;
}
.leftTransformIcon {
transform: scaleX(-1);
}
.content {
width: 100%;
height: 100%;
border-radius: 0;
position: fixed;
top: 50%;
left: 50%;
z-index: var(--lightbox-z-index);
}
.overlay {
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: var(--lightbox-z-index);
}
.overlay[data-entering] {
animation: darken-background 0.2s;
}
.overlay[data-exiting] {
animation: darken-background 0.2s reverse;
}
.galleryContainer {
background-color: var(--Base-Background-Primary-Normal);
padding: var(--Spacing-x2);
height: 100%;
display: flex;
flex-direction: column;
position: relative;
overflow-y: auto;
}
.galleryHeader {
display: flex;
justify-content: space-between;
align-items: center;
height: 1.71875rem;
}
.desktopGallery,
.desktopGalleryCloseButton,
.desktopThumbnailGrid,
.navigationButton {
display: none;
}
.imageCaption {
background-color: var(--Base-Surface-Subtle-Normal);
padding: var(--Spacing-x-half) var(--Spacing-x1);
border-radius: var(--Corner-radius-Small);
}
.mainImageWrapper {
position: relative;
width: 100%;
}
.mainImageContainer {
width: 100%;
height: 100%;
will-change: transform;
overflow: hidden;
}
.mainImageContainer img,
.thumbnailContainer img {
border-radius: var(--Corner-radius-Small);
cursor: pointer;
transition: opacity 0.3s ease-in-out;
}
.thumbnailGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--Spacing-x1);
max-height: none;
}
.thumbnailContainer {
position: relative;
height: 242px;
}
.fullWidthImage {
grid-column: 1 / -1;
height: 240px;
}
.thumbnailContainer img {
border-radius: var(--Corner-radius-Medium);
}
.fullViewContainer {
background-color: var(--UI-Text-High-contrast);
height: 100%;
padding: var(--Spacing-x2);
position: relative;
align-items: center;
display: grid;
grid-template-rows: auto 1fr auto;
place-content: center;
gap: var(--Spacing-x5);
}
.fullViewHeader {
display: flex;
justify-content: center;
width: 100%;
}
.fullViewImageContainer {
position: relative;
width: 358px;
height: 240px;
margin-bottom: var(--Spacing-x5);
}
.fullViewImage {
position: absolute;
width: 100%;
height: 100%;
border-radius: var(--Corner-radius-Medium);
}
.fullViewImageContainer img {
border-radius: var(--Corner-radius-Medium);
width: 100%;
height: 100%;
}
.fullViewFooter {
position: absolute;
bottom: calc(-1 * var(--Spacing-x5));
}
.imagePosition {
background-color: var(--UI-Grey-90);
padding: var(--Spacing-x-quarter) var(--Spacing-x-half);
border-radius: var(--Corner-radius-Small);
}
.portraitImage {
max-width: 548px;
}
@media (min-width: 1367px) {
.mobileGallery,
.thumbnailGrid {
display: none;
}
.content {
border-radius: var(--Corner-radius-Large);
position: fixed;
top: 50%;
left: 50%;
overflow: hidden;
}
.galleryContent {
width: 1090px;
height: 725px;
}
.fullViewContent {
width: 100vw;
height: 100vh;
}
.galleryContainer {
padding: var(--Spacing-x5) var(--Spacing-x6);
}
.desktopGallery {
display: grid;
grid-template-rows: 1.71875rem 1fr 7.8125rem;
row-gap: var(--Spacing-x-one-and-half);
background-color: var(--Base-Background-Primary-Normal);
height: 100%;
position: relative;
overflow: hidden;
}
.desktopGalleryCloseButton {
display: block;
position: absolute;
top: var(--Spacing-x-one-and-half);
right: var(--Spacing-x-half);
}
.desktopThumbnailGrid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: var(--Spacing-x1);
max-height: 7.8125rem;
overflow: hidden;
}
.thumbnailContainer {
height: 125px;
}
.fullViewCloseButton {
position: fixed;
top: var(--Spacing-x-one-and-half);
right: var(--Spacing-x-half);
}
.fullWidthImage {
grid-column: auto;
height: auto;
}
.thumbnailContainer img {
border-radius: var(--Corner-radius-Small);
}
.fullViewContainer {
margin-top: 0;
padding: var(--Spacing-x5);
grid-template-rows: auto 1fr auto;
grid-template-columns: 1fr;
justify-items: center;
width: 100%;
height: 100%;
}
.fullViewImageContainer {
position: relative;
width: 90%;
max-width: 90.875rem;
height: 100%;
max-height: 43.75rem;
}
.navigationButton {
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: var(--Base-Button-Inverted-Fill-Normal);
border-radius: 50%;
padding: var(--Spacing-x1);
cursor: pointer;
border: none;
display: flex;
z-index: 1;
}
.galleryPrevButton {
left: var(--Spacing-x2);
}
.galleryNextButton {
right: var(--Spacing-x2);
}
.fullViewNextButton {
right: var(--Spacing-x5);
}
.fullViewPrevButton {
left: var(--Spacing-x5);
}
.fullViewFooter {
text-align: left;
}
}