From 0d907b11bbe012f6fe4403f8ecf5e077a64ca1e2 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Sun, 21 Jul 2024 11:15:22 +0200 Subject: [PATCH] doc: give full width to NIC overview page The wide tables in the NIC overview exceed the normal page width because of the large number of drivers. A CSS trick is added to allow displaying the tables in the full width of the browser window. Signed-off-by: Thomas Monjalon --- doc/guides/custom.css | 13 +++++++++++++ doc/guides/nics/overview.rst | 2 ++ 2 files changed, 15 insertions(+) diff --git a/doc/guides/custom.css b/doc/guides/custom.css index 221024655c0..b662abb34e0 100644 --- a/doc/guides/custom.css +++ b/doc/guides/custom.css @@ -4,6 +4,19 @@ /* Override readthedocs theme */ +/* Set full width for all responsive tables of a page. + * Usage: insert the following line in the doc. + * .. rst-class:: widepage + */ +@media screen and (min-width: 1100px) { + .wy-nav-content-wrap:has(.widepage) { + background: #fcfcfc !important; + } + .wy-nav-content:has(.widepage) .wy-table-responsive { + overflow: visible !important; + } +} + /* Spacing before a list item must be bigger than spacing inside the item. * Complex list items start with a p.first element. */ .section li > .first { diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst index 67575c699c0..4553076481d 100644 --- a/doc/guides/nics/overview.rst +++ b/doc/guides/nics/overview.rst @@ -24,6 +24,8 @@ Most of these differences are summarized below. More details about features can be found in :doc:`features`. +.. rst-class:: widepage + .. _table_net_pmd_features: .. include:: overview_table.txt