|
38 | 38 | pre.install-cmd { |
39 | 39 | margin: 0 0 10px; padding: 14px 52px 14px 18px; font-size: 14px; |
40 | 40 | display: inline-flex; align-items: center; gap: 20px; position: relative; |
| 41 | + /* The command is one long unbreakable line; without this the inline-flex |
| 42 | + box sizes to it and drags the whole column wider than a phone. */ |
| 43 | + max-width: 100%; |
41 | 44 | } |
42 | 45 | pre.install-cmd[hidden] { display: none; } |
43 | 46 | pre.install-cmd code { color: var(--safe); } |
44 | 47 | /* One line of text, so the button centers rather than sitting at the top |
45 | 48 | the way it does on a multi-line block. */ |
46 | 49 | pre.install-cmd .copy-btn { top: 50%; transform: translateY(-50%); } |
47 | 50 | p.install-note { font-size: 13px; color: var(--ink-soft); margin: 0 0 44px; } |
48 | | - .hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; } |
49 | | - @media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } } |
50 | | - .compare-hero { display: grid; grid-template-columns: 1fr; gap: 14px; } |
| 51 | + /* minmax(0, ...) rather than a bare fraction, and min-width on the items: |
| 52 | + a grid track's automatic minimum is its content's min-content width, and |
| 53 | + a <pre> of code has no wrap opportunities, so an unqualified 1fr grew the |
| 54 | + column past the viewport on a phone and the page was clipped rather than |
| 55 | + laid out. The same reason .doc carries min-width: 0. */ |
| 56 | + .hero-grid { |
| 57 | + display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); |
| 58 | + gap: 48px; align-items: start; |
| 59 | + } |
| 60 | + .hero-grid > * { min-width: 0; } |
| 61 | + @media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } } |
| 62 | + .compare-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; } |
| 63 | + .compare-hero > * { min-width: 0; } |
51 | 64 | .compare-hero pre { margin: 0; font-size: 12.6px; } |
52 | 65 | .compare-hero .highlight { margin: 0; } |
53 | 66 | .compare-label { |
|
94 | 107 | } |
95 | 108 | p.lede-s { color: var(--ink-mid); max-width: 62ch; margin: 0 0 32px; } |
96 | 109 |
|
97 | | - .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } |
98 | | - @media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } } |
| 110 | + .grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } |
| 111 | + .grid-2 > * { min-width: 0; } |
| 112 | + @media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } } |
99 | 113 |
|
100 | 114 | .card { |
101 | 115 | background: var(--card); border: 1px solid var(--rule); border-radius: 10px; |
|
0 commit comments