readthedocs / sphinx_rtd_theme

Sphinx theme from Read the Docs
https://sphinx-rtd-theme.readthedocs.io/
MIT License
4.8k stars 1.74k forks source link

Fix word wrapping in RST list-table #1506

Open jsquyres opened 1 year ago

jsquyres commented 1 year ago

The diff on this PR is gigantic because the CSS is minified. The diff is effectively this:

$ diff -u theme.css-orig theme.css-new
--- theme.css-orig  2023-08-19 15:08:11
+++ theme.css-new   2023-08-19 15:08:22
@@ -1 +1 @@
-.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}
+.wy-table-responsive table th{white-space:nowrap}

This seems to fix #1505 for me, but I don't know if there's a historical or other deeper reason that that stanza is there in the CSS.

jsquyres commented 1 year ago

I am not an expert in front-end dev things, but it looks like theme.css might actually be generated, and the source of the wy-table-responsive CSS stanzas comes from https://github.com/snide/wyrm/blob/master/sass/wyrm_core/_table.sass#L144-L151

Since this is not the ecosystem I typically work in, I'm not sure about the right way to proceed here. Is there a way to get word wrapping enabled in sphinx_rtd_theme tables?