[lldb][docs] Remove -webkit-hyphens in table cells so that table widths are correct...
authorRaphael Isemann <teemperor@gmail.com>
Wed, 20 Jan 2021 08:05:09 +0000 (09:05 +0100)
committerRaphael Isemann <teemperor@gmail.com>
Wed, 20 Jan 2021 08:05:28 +0000 (09:05 +0100)
The tables in the new LLDB documentation currently are less wide than their
contents. The reason for that seems to be the `-webkit-hyphens: auto` property
that sphinx is setting for all `p` tags. The `p` tags in the generated Python
documentation seem to trigger some Safari layout issue, so Safari is calculating
the cell width to be smaller than it should be (which ends up looking like this
{F15104344} ).

This patch just sets that property back to the browser default `manual`. Not
sure if that's the proper workaround, but I clicked around on the website with
the changed CSS and nothing looked funny (which is I believe how webdev unit
testing works).

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D94991

lldb/docs/_static/lldb.css

index 53b7259..6df20b7 100644 (file)
@@ -44,6 +44,13 @@ table.mapping td.content {
   padding-bottom: 15px;
 }
 
+/* Workaround for a Safari bug that would otherwise make table cells less wide
+than the containing text. This just sets it back to the default browser
+property.*/
+td p {
+  -webkit-hyphens: manual !important;
+}
+
 div.sphinxsidebar .caption {
   font-family: Helvetica, Verdana, sans-serif;
   font-size: 10pt;