Skip to content

docs: make tables responsive with content-aware column widths

Rito Rhymes linux-doc linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2docs: apply contained horizontal scroll overflow to tablesDocumentation/conf.py Documentation/sphinx-static/custom.css Documentation/sphinx/table_layout.py+50 -00 replies
2/2docs: derive table column minimum widths from contentDocumentation/sphinx-static/custom.css Documentation/sphinx/table_layout.py+284 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] docs: make tables responsive with content-aware column widths

This series establishes a responsive layout foundation for generated tables throughout the documentation site. Wide tables can use contained horizontal scrolling on narrow viewports instead of widening the page or compressing their columns until the content becomes unreadable.

It also derives content-aware minimum widths for each column, giving table content a reasonable floor before wrapping. This prevents aggressive wrapping from collapsing a column's own text into nearly vertical lines and prevents wider columns from squeezing neighboring columns into the same unreadable state.

This addresses the current pathological failure modes in which tables either widen the page beyond its margins or collapse columns into nearly vertical text.

Integration note:

This series is intended to stack on top of Mauro's "docs: custom.css:
don't limit randering to old 800px monitors", retaining its 120em body maximum.

Jon's revert of "docs: allow inline literals in paragraphs to wrap to prevent overflow" should not be carried forward. Patch 2 retains
overflow-wrap: anywhere and prevents the unreadable table wrapping that motivated the revert by adding content-derived column minimums.

Rito Rhymes (2):
docs: apply contained horizontal scroll overflow to tables
docs: derive table column minimum widths from content

 Documentation/conf.py                  |   1 +
 Documentation/sphinx-static/custom.css | 198 ++++++++++++++++++++++++-
 Documentation/sphinx/table_layout.py   | 136 +++++++++++++++++
 3 files changed, 334 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/sphinx/table_layout.py

base-commit: a635d6748234582ea287c5ffeae28b9b23f91c7e

Signature · 1 line
2.51.0