mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: Re: [ptxdist] [APPLIED] doc: css: allow word-wrapping in grid table cells
Date: Fri,  5 May 2023 16:56:54 +0200	[thread overview]
Message-ID: <20230505145654.2964659-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20230502075505.316900-1-rhi@pengutronix.de>

Thanks, applied as 6066e020c5324aebe9aec5bf43c9b84e3453819f.

Michael

[sent from post-receive hook]

On Fri, 05 May 2023 16:56:54 +0200, Roland Hieber <rhi@pengutronix.de> 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 <rhi@pengutronix.de>
> Message-Id: <20230502075505.316900-1-rhi@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> 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;
> +}



      reply	other threads:[~2023-05-05 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02  7:55 [ptxdist] [PATCH] " Roland Hieber
2023-05-05 14:56 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230505145654.2964659-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=rhi@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox