Re: [PATCH v3] docs: contain horizontal overflow in C API descriptions
From: Rito Rhymes
Date: Thu Mar 26 2026 - 15:21:19 EST
> It should wrap so that the entire prototype is visible, but the
> way that happens on small screens is definitely ugly. The trick
> would be to have it wrap the way it would for an overly long line
> in the source.
I re-rolled it again to match those specs.
FWIW:
I tackled basically the same issue in Public Inbox; Eric wanted
it the way you described, but he was married to his highly efficent
custom blob rendering system where the approach caused regressions
with no reasonable workaround. And no alternative systems I tried
came close to his system's efficiency even though they fixed the
issue. At the end of the day, page-wide horizontal scroll overflow
turned out to be the best fit solution there.
I think the preserved whitespace wrapping approach should work fine
here though.
I rerolled so you can choose whichever you think is best, though
personally, I think contained horizontal scroll overflow is the
way to go since it provides a more straight-forward awareness of
the code shape without needing to be aware of wrapping distortions.
I leave it to you.
Rito