Skip to content
Merged
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
4 changes: 4 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,10 @@ select.input::-ms-expand {
flex-wrap: wrap;
padding: 0;
}
/* A chip wider than the list wraps its words, as on a phone, rather than running under the arrow stub. */
.dest-main > .dest-body .stat-chip {
white-space: normal;
}
.dest-main > .chev {
align-self: stretch;
margin-inline-start: 6px;
Expand Down
10 changes: 7 additions & 3 deletions src/ui/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,18 @@ export function groupCardEl(
const main = el(
"button",
{
class: "dest-main",
class: "dest-main dest-main-stacked",
type: "button",
attrs: { "aria-label": `${ctx.label(group.station)}${summary}` },
on: { click: () => ctx.onOpenRoute(origin, destination) },
},
[
stationNameEl("dest-name", group.station, ctx.label(group.station)),
el("span", { class: "dest-meta", attrs: { "aria-hidden": "true" } }, meta),
// Name on its own line above the chips, as on the other discovery cards: in one row the
// fixed-width chip and duration leave it a few pixels in a narrow list, and "Lyon" vanishes.
el("div", { class: "dest-body" }, [
stationNameEl("dest-name", group.station, ctx.label(group.station)),
el("span", { class: "dest-meta", attrs: { "aria-hidden": "true" } }, meta),
]),
el("span", { class: "chev", attrs: { "aria-hidden": "true" } }, [icon(I.arrow)]),
],
);
Expand Down
Loading