about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2021-10-24 15:28:58 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2021-10-25 11:40:13 +0200
commit345519baa7669a49bc4b79882ac97d4e358b42b1 (patch)
treefd71845f031e07a8576ad1a8aa485489df1ebdd6
parent56694b04532cc0dec6e2f577135da3513e856923 (diff)
Fix scrollbars appearing on information tooltip on mac when they shouldn't
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css2
-rw-r--r--src/test/rustdoc-gui/overflow-tooltip-information.goml8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 6c908a21c39..4e4dd21120f 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -532,7 +532,7 @@ nav.sub {
 	position: relative;
 }
 
-.docblock > * {
+.docblock > :not(.information) {
 	max-width: 100%;
 	overflow-x: auto;
 }
diff --git a/src/test/rustdoc-gui/overflow-tooltip-information.goml b/src/test/rustdoc-gui/overflow-tooltip-information.goml
new file mode 100644
index 00000000000..7ef85a4c445
--- /dev/null
+++ b/src/test/rustdoc-gui/overflow-tooltip-information.goml
@@ -0,0 +1,8 @@
+// The goal of this test is to ensure that the tooltip `.information` class doesn't
+// have overflow and max-width CSS rules set because they create a bug in firefox on
+// mac. For more information: https://github.com/rust-lang/rust/issues/89185
+goto: file://|DOC_PATH|/test_docs/fn.foo.html
+assert-css: (".docblock > .information", {
+    "overflow-x": "visible",
+    "max-width": "none"
+}, ALL)