[v2,2/2] doc: give full width to NIC overview page

Message ID 20240731083332.709421-3-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series custom doc styling |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Thomas Monjalon July 31, 2024, 8:31 a.m. UTC
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 this page in the full width
of the browser window.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v2: no change
---
 doc/guides/custom.css        | 8 ++++++++
 doc/guides/nics/overview.rst | 2 ++
 2 files changed, 10 insertions(+)
  

Comments

Ferruh Yigit July 31, 2024, 11:29 a.m. UTC | #1
On 7/31/2024 9:31 AM, Thomas Monjalon wrote:
> 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 this page in the full width
> of the browser window.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>

This makes the feature table wider, so all table can fit, and scroll bar
below the table is gone, this is good.

But also it makes all paragraphs and 'Note' boxes in that page fill all
the screen, and with a wide screen this becomes a long box through end
of the screen and personally I think doesn't look nice.

Instead of making it full screen, is there are way to make it fixed
size, but larger than previous so that table still can expand fully?
  
Thomas Monjalon July 31, 2024, 12:43 p.m. UTC | #2
31/07/2024 13:29, Ferruh Yigit:
> On 7/31/2024 9:31 AM, Thomas Monjalon wrote:
> > 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 this page in the full width
> > of the browser window.
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >
> 
> This makes the feature table wider, so all table can fit, and scroll bar
> below the table is gone, this is good.
> 
> But also it makes all paragraphs and 'Note' boxes in that page fill all
> the screen, and with a wide screen this becomes a long box through end
> of the screen and personally I think doesn't look nice.
> 
> Instead of making it full screen, is there are way to make it fixed
> size, but larger than previous so that table still can expand fully?

We may try to restrict non-table containers, but then it will be less generic.
I mean this solution could apply to any large page today.

We may try to force the width of <p> and <ul>.
  
Thomas Monjalon July 31, 2024, 3:56 p.m. UTC | #3
31/07/2024 14:43, Thomas Monjalon:
> 31/07/2024 13:29, Ferruh Yigit:
> > On 7/31/2024 9:31 AM, Thomas Monjalon wrote:
> > > 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 this page in the full width
> > > of the browser window.
> > > 
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > >
> > 
> > This makes the feature table wider, so all table can fit, and scroll bar
> > below the table is gone, this is good.
> > 
> > But also it makes all paragraphs and 'Note' boxes in that page fill all
> > the screen, and with a wide screen this becomes a long box through end
> > of the screen and personally I think doesn't look nice.
> > 
> > Instead of making it full screen, is there are way to make it fixed
> > size, but larger than previous so that table still can expand fully?
> 
> We may try to restrict non-table containers, but then it will be less generic.
> I mean this solution could apply to any large page today.
> 
> We may try to force the width of <p> and <ul>.

I've found another trick to let only tables overflow.
I'll send a v3 and will apply quickly.
  

Patch

diff --git a/doc/guides/custom.css b/doc/guides/custom.css
index 221024655c..df1a52f1d4 100644
--- a/doc/guides/custom.css
+++ b/doc/guides/custom.css
@@ -4,6 +4,14 @@ 
 
 /* Override readthedocs theme */
 
+/* Set full width on a page.
+ * Usage: insert the following line in the doc.
+ *        .. rst-class:: widepage
+ */
+.wy-nav-content:has(.widepage) {
+    max-width: none !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 67575c699c..4553076481 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