Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/src/views/listings/ListingDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import ListingLocationCard from './components/ListingLocationCard.jsx';
import ListingWorkspace from './components/ListingWorkspace.jsx';
import ListingDescriptionCard from './components/ListingDescriptionCard.jsx';
import './ListingDetail.less';
import './ListingDetail.mobile.less';
import { useTranslation } from '../../services/i18n/i18n.jsx';
import { useFinanceProfile } from '../../hooks/useFinanceProfile.js';

Expand Down
84 changes: 84 additions & 0 deletions ui/src/views/listings/ListingDetail.mobile.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
@import '../../tokens.less';

/* Local override: keeps the listing detail view inside the viewport on phones (< 430px).
Kept in its own file, loaded after ListingDetail.less, so upstream merges stay trivial.
Everything is scoped to `.listing-detail` and to one media query. */
@media (max-width: 430px) {
.listing-detail {
/* A flex item of `.app__content`; without `min-width: 0` it grows to its widest child. */
width: 100%;
min-width: 0;
max-width: 100%;
overflow-x: clip;

img,
picture,
video,
canvas,
svg,
.semi-image,
.semi-image-img {
max-width: 100%;
}

&__grid,
&__main,
&__rail,
&__grid > *,
.listing-card {
min-width: 0;
max-width: 100%;
box-sizing: border-box;
}

/* The rail has a fixed 400px width on desktop; drop it so it can never exceed the screen. */
&__rail {
width: auto;
flex-basis: auto;
}

&__image {
width: 100%;
max-width: 100%;
}

/* Long words and URLs wrap instead of pushing the card wider. */
.listing-title__heading,
.listing-title__address,
.listing-title__address-link,
.listing-card,
.listing-card p,
.listing-card a,
.listing-card span,
.listing-description__body,
.listing-origin {
overflow-wrap: anywhere;
word-break: break-word;
}

.listing-title {
padding-left: @space-4;
padding-right: @space-4;
}

.listing-title__heading {
max-width: 100%;
font-size: 24px;
}

.listing-title__address {
flex-basis: 100%;
}

/* Column layouts collapse to one column. */
.listing-keyfacts__tiles,
.listing-workspace__columns,
.listingFinance__facts {
grid-template-columns: minmax(0, 1fr);
}

.listing-card {
padding: @space-4;
}
}
}
Loading