Re: [PATCH 1/1] docs: wrap generated tables to contain small-screen overflow

From: Randy Dunlap

Date: Sat Mar 21 2026 - 15:20:03 EST




On 3/21/26 6:38 AM, Rito Rhymes wrote:
> Some documentation tables exceed the fixed-width main content column.
> On desktop this is usually acceptable because they can overflow the
> 800px body without harming readability, but on smaller screens the
> same tables create page-wide horizontal scroll overflow that breaks the
> layout.
>
> Wrap generated HTML tables in a dedicated container. Above
> Alabaster's existing 65em breakpoint, the wrapper uses
> `display: contents` to preserve current desktop rendering. At and
> below that width, it becomes a horizontal scroll container so table
> overflow is contained locally instead of breaking page layout.

Yes, I can (did) observe that happening (horizontal slider bar).
Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

Thanks.

> Signed-off-by: Rito Rhymes <rito@xxxxxxxxxxxxxx>
> ---
> Documentation/conf.py | 1 +
> Documentation/sphinx-static/custom.css | 16 ++++++++++++++
> Documentation/sphinx/table_wrapper.py | 30 ++++++++++++++++++++++++++
> 3 files changed, 47 insertions(+)
> create mode 100644 Documentation/sphinx/table_wrapper.py

--
~Randy