From 8b346754eda9e9cddeeb50b1103d461cf3196843 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 14 Nov 2022 14:11:30 -0700 Subject: [PATCH 1/2] rustdoc: remove no-op CSS `.popover { font-size: 1rem }` This rule was added in cc4f804829ae because the help popover inherited the font-size from the help button "?" icon. It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it. --- src/librustdoc/html/static/css/rustdoc.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 3f295b96dc56..b83bb405dc2b 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -920,7 +920,6 @@ so that we can apply CSS-filters to change the arrow color in themes */ } .popover { - font-size: 1rem; position: absolute; right: 0; z-index: 2; @@ -928,7 +927,6 @@ so that we can apply CSS-filters to change the arrow color in themes */ margin-top: 7px; border-radius: 3px; border: 1px solid var(--border-color); - font-size: 1rem; --popover-arrow-offset: 11px; } From bd84709298a096fb9518e1f14ee58d3a5bd21ae2 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Mon, 14 Nov 2022 14:34:46 -0700 Subject: [PATCH 2/2] rustdoc: add test case for font size in help popover --- src/test/rustdoc-gui/help-page.goml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/rustdoc-gui/help-page.goml b/src/test/rustdoc-gui/help-page.goml index 521e14748af1..392f17bfd47c 100644 --- a/src/test/rustdoc-gui/help-page.goml +++ b/src/test/rustdoc-gui/help-page.goml @@ -3,6 +3,7 @@ goto: "file://" + |DOC_PATH| + "/help.html" size: (1000, 1000) // Try desktop size first. wait-for: "#help" assert-css: ("#help", {"display": "block"}) +assert-css: ("#help dd", {"font-size": "16px"}) click: "#help-button > a" assert-css: ("#help", {"display": "block"}) compare-elements-property: (".sub", "#help", ["offsetWidth"]) @@ -18,6 +19,7 @@ size: (1000, 1000) // Only supported on desktop. assert-false: "#help" click: "#help-button > a" assert-css: ("#help", {"display": "block"}) +assert-css: ("#help dd", {"font-size": "16px"}) click: "#help-button > a" assert-css: ("#help", {"display": "none"}) compare-elements-property-false: (".sub", "#help", ["offsetWidth"])