From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 05 May 2023 16:57:30 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1puwsE-006Dgr-Tu for lore@lore.pengutronix.de; Fri, 05 May 2023 16:57:30 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1puwsC-0003HF-GK; Fri, 05 May 2023 16:57:28 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1puwrg-0003Gz-0k; Fri, 05 May 2023 16:56:56 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1puwrf-001Jx4-C3; Fri, 05 May 2023 16:56:55 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1puwre-00CRP4-MU; Fri, 05 May 2023 16:56:54 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Fri, 5 May 2023 16:56:54 +0200 Message-Id: <20230505145654.2964659-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230502075505.316900-1-rhi@pengutronix.de> References: <20230502075505.316900-1-rhi@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] doc: css: allow word-wrapping in grid table cells X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 6066e020c5324aebe9aec5bf43c9b84e3453819f. Michael [sent from post-receive hook] On Fri, 05 May 2023 16:56:54 +0200, Roland Hieber wrote: > By default, spinx_rtd_theme sets the CSS attribute "white-space: nowrap" > on table cells, which has the effect, that table contents never > word-wrap and the table gets scrollable. This is unfortunate if table > cells contain a large amount of text. > > Issue #1246 of sphinx_rtd_theme addresses this situation, but the > general fix is not that easy. Until this issue is fixed upstream, > introduce a custom CSS class named "word-wrap" that reverts the > behaviour of table cells back to do word wrapping when the content of > the cell is wider than the available width. > > With this change, the following example should produce a table as wide > as the content area with word-wrapped text in the second row: > > .. table:: > :class: word-wrap > > +--------------------------------+-----------------------------+ > | Column 1 | Column 2 | > +================================+=============================+ > | Lorem ipsum dolor sit amet, | Duis aute irure dolor in | > | adipisicing elit, sed do eius | voluptate velit esse cillum | > | incididunt ut labore et dolor | fugiat nulla pariatur. | > | aliqua. Ut enim ad minim veni | Excepteur sint occaecat | > | nostrud exercitation ullamco | proident, sunt in culpa | > | nisi ut aliquip ex ea commodi. | deserunt mollit anim id. | > +--------------------------------+-----------------------------+ > | Third Row | Third Row continued | > +--------------------------------+-----------------------------+ > > Link: https://github.com/readthedocs/sphinx_rtd_theme/issues/1246 > Signed-off-by: Roland Hieber > Message-Id: <20230502075505.316900-1-rhi@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css > index 0efa6f92cac5..258e8f70ebfb 100644 > --- a/doc/_static/css/custom.css > +++ b/doc/_static/css/custom.css > @@ -109,3 +109,8 @@ nav.wy-nav-side #menu-resize .fa:not(:first-child) { > .note .admonition-title { > background-color: #83983e !important; > } > + > +.wy-table-responsive table.word-wrap td, > +.wy-table-responsive table.word-wrap th { > + white-space: normal; > +}