SaleDetailsPage needed correct imageWrappers (and aspect wrappers)

This commit is contained in:
Vesa Luusua 2017-10-02 19:27:45 +03:00
parent de7d822a2e
commit 59d0f718cf
2 changed files with 44 additions and 24 deletions

View file

@ -20,9 +20,18 @@
white-space: nowrap;
}
.aspectWrapperMobile,
.aspectWrapperDesktop {
.imageWrapperMobile {
/* Layout */
display: block;
width: 100%;
position: relative;
@media (--viewportLarge) {
display: none;
}
}
.aspectWrapper {
padding-bottom: 66.6667%; /* 3:2 Aspect Ratio */
background-color: var(--matterColorNegative); /* Loading BG color */
}
@ -154,6 +163,13 @@
}
}
.breakdownImageWrapper {
/* Layout */
display: block;
width: 100%;
position: relative;
}
.breakdownTitleMobile {
/* Font */
color: var(--matterColorAnti);

View file

@ -195,17 +195,19 @@ export const SaleDetailsPanelComponent = props => {
return (
<div className={classes}>
<div className={css.container}>
<div className={css.aspectWrapperMobile}>
<ResponsiveImage
rootClassName={css.rootForImage}
alt={listingTitle}
image={firstImage}
nameSet={[
{ name: 'landscape-crop', size: '400w' },
{ name: 'landscape-crop2x', size: '800w' },
]}
sizes="100vw"
/>
<div className={css.imageWrapperMobile}>
<div className={css.aspectWrapper}>
<ResponsiveImage
rootClassName={css.rootForImage}
alt={listingTitle}
image={firstImage}
nameSet={[
{ name: 'landscape-crop', size: '400w' },
{ name: 'landscape-crop2x', size: '800w' },
]}
sizes="100vw"
/>
</div>
</div>
<div className={css.avatarWrapper}>
<AvatarMedium user={currentCustomer} className={css.avatarMobile} />
@ -229,17 +231,19 @@ export const SaleDetailsPanelComponent = props => {
{bookingInfo}
</div>
<div className={css.breakdownContainerDesktop}>
<div className={css.aspectWrapperDesktop}>
<ResponsiveImage
rootClassName={css.rootForImage}
alt={listingTitle}
image={firstImage}
nameSet={[
{ name: 'landscape-crop', size: '400w' },
{ name: 'landscape-crop2x', size: '800w' },
]}
sizes="100%"
/>
<div className={css.breakdownImageWrapper}>
<div className={css.aspectWrapper}>
<ResponsiveImage
rootClassName={css.rootForImage}
alt={listingTitle}
image={firstImage}
nameSet={[
{ name: 'landscape-crop', size: '400w' },
{ name: 'landscape-crop2x', size: '800w' },
]}
sizes="100%"
/>
</div>
</div>
<h3 className={css.breakdownTitleDesktop}>
<FormattedMessage id="SaleDetailsPanel.bookingBreakdownTitle" />