Skip to content

Commit ac6cdcd

Browse files
dorlugasigalCopilot
andcommitted
fix(site): repair mobile feature card rendering
The mobile rule .feature-visual { max-height: 240px } constrained the parent flex container while .device-phone--xl (220px wide x 9:19.5 aspect = ~480px tall) overflowed it. With centered alignment, phones spilled above and below the visual container, intersecting description text and tag pills. Browser-device videos also lacked an explicit max-width on small viewports. - Drop the artificial max-height; let .feature-visual grow to fit its device naturally. - Cap .device-phone--xl at min(60vw, 220px) and force browser device to 100% of available width on small viewports. - Switch video object-fit to cover with explicit dims so the device frame fills cleanly. - Shorten scroll-reveal transition on mobile to 0.4s so cards don't appear blank during fast scrolls. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent be596c2 commit ac6cdcd

1 file changed

Lines changed: 26 additions & 11 deletions

File tree

packages/site/src/styles/landing.css

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,14 +1679,25 @@ section[id] {
16791679
.feature--center .feature-text {
16801680
margin-bottom: 20px;
16811681
}
1682-
/* Cap visual height so videos don't dominate the page on narrow viewports */
1682+
/* Allow visual to size to its content (phones are tall by nature). */
16831683
.feature-visual {
1684-
max-height: 240px;
1684+
width: 100%;
1685+
align-self: stretch;
1686+
}
1687+
.feature-visual .device-browser--xl {
1688+
width: 100%;
1689+
max-width: 100%;
1690+
}
1691+
/* Phone aspect on small screens — kept compact so cards don't dominate. */
1692+
.device-phone--xl,
1693+
.feature--center .device-phone--xl {
1694+
width: min(60vw, 220px);
16851695
}
16861696
.feature-visual video {
1687-
max-height: 240px;
1688-
width: auto;
1689-
object-fit: contain;
1697+
width: 100%;
1698+
height: 100%;
1699+
object-fit: cover;
1700+
display: block;
16901701
}
16911702
/* Tighten text rhythm to keep mobile feature stack short */
16921703
.feature-text {
@@ -1702,17 +1713,21 @@ section[id] {
17021713
.features-header {
17031714
padding-bottom: 16px;
17041715
}
1705-
.device-phone--xl {
1706-
width: 220px;
1707-
}
1708-
.feature--center .device-phone--xl {
1709-
width: 240px;
1710-
}
17111716
.feature-visual .device-phone--overlay {
17121717
width: 140px;
17131718
right: -5px;
17141719
bottom: -15px;
17151720
}
1721+
/* Faster, gentler reveal on mobile — avoids cards looking empty mid-scroll. */
1722+
.js .feature .feature-text,
1723+
.js .feature .feature-visual {
1724+
transition-duration: 0.4s;
1725+
transform: translateY(16px);
1726+
}
1727+
.js .feature .feature-visual {
1728+
transform: translateY(20px) scale(0.99);
1729+
transition-delay: 0.05s;
1730+
}
17161731

17171732
.how-it-works {
17181733
padding: 100px 16px;

0 commit comments

Comments
 (0)