Use flexbox instead of grid for row alignment (old GeckoView fix) #4
Loading…
Reference in a new issue
No description provided.
Delete branch "tv-flexbox-row-alignment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported from the actual TV (a GeckoView-based browser, likely an older
build): every element in a row - rank badge, name, score, all of them
together - was shifted down and not vertically centered. Worked fine on
desktop Chromium and desktop Firefox.
What was happening
.score-rowlaid out its three children with CSS Grid(
grid-template-columns: auto 1fr auto) and centered them withalign-items: center. The rank badge next to it uses plain flexboxcentering and was never reported as broken - only the grid-based row was.
Grid's alignment behavior has a real history of being less consistently
implemented across engines and versions than flexbox's, particularly in
embedded ports like GeckoView, which can lag behind desktop Gecko on engine
fixes.
Fix
This row is a plain fixed | grow | fixed layout - one row, three items, no
2D structure actually needed. Grid was the wrong tool for it even before
this bug showed up. Switched to flexbox, which is older, simpler for this
shape, and has always been the safer bet for cross-engine reliability.
.player-namegetsflex: 1in place of the grid column's1fr, withmin-width: 0so it can still shrink for the ellipsis (flex items defaultto
min-width: auto, which blocks that - flexbug #1).Testing
Confirmed byte-identical output in Chromium (same screenshot size as the
last verified-good render) and pixel-identical in desktop Firefox, so this
changes nothing for engines where grid already worked - it only removes a
failure mode for the ones where it didn't. I don't have access to an actual
GeckoView/Android device to test directly.