Commit fc2b206
committed
fix: don't stack multiple phone header controls on top of each other
App-primaryControl is an extension point, so a page can carry several
header controls — core's 'start discussion' button plus, say, an
extension's follow button on a tag page. On phones each one is
positioned absolutely against the right edge, so they rendered on top of
one another as a single smudged glyph.
Where the controls share a parent — they are list items of the same nav
— that parent now becomes a right-anchored flex row and the controls
return to relative positioning, letting the browser lay them out side by
side at whatever width each one is. Selected with :has() so it only
applies when a second control is actually present; pages with a single
control keep their existing geometry exactly.
Measured at 390px: the tag page's two controls went from both occupying
339-390 to 288-339 and 339-390; index, discussion and user pages are
byte-identical.1 parent b3ec202 commit fc2b206
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
56 | 79 | | |
57 | 80 | | |
58 | 81 | | |
| |||
0 commit comments