diff --git a/tests/rustdoc-gui/deref-block.goml b/tests/rustdoc-gui/deref-block.goml
index 24f612f8a6f..97930b61ef4 100644
--- a/tests/rustdoc-gui/deref-block.goml
+++ b/tests/rustdoc-gui/deref-block.goml
@@ -20,8 +20,12 @@ assert-css: (".big-toggle summary::before", {
     "left": "-11px",
     "top": "9px",
 })
-// It should have the same X position as the other toggles.
-compare-elements-position: (".big-toggle summary::before", ".method-toggle summary::before", ["x"])
+// It should have a slightly different X position as the other toggles.
+store-position: (".big-toggle summary::before", {"x": big_toggle})
+store-position: (".method-toggle summary::before", {"x": small_toggle})
+assert: |big_toggle| < |small_toggle|
+// Margin is 0.5em so around 8 px.
+assert: |small_toggle| - |big_toggle| < 10
 // But still shouldn't have the same Y position.
 compare-elements-position-false: (
     ".big-toggle summary::before",
diff --git a/tests/rustdoc-gui/docblock-table-overflow.goml b/tests/rustdoc-gui/docblock-table-overflow.goml
index 1ca919d1eab..60fbd69fe3f 100644
--- a/tests/rustdoc-gui/docblock-table-overflow.goml
+++ b/tests/rustdoc-gui/docblock-table-overflow.goml
@@ -16,6 +16,6 @@ compare-elements-property: (
     "#implementations-list > details .docblock > p",
     ["scrollWidth"],
 )
-assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "816"})
+assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "832"})
 // However, since there is overflow in the <table>, its scroll width is bigger.
 assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"})
diff --git a/tests/rustdoc-gui/item-info-alignment.goml b/tests/rustdoc-gui/item-info-alignment.goml
index cd0624056b9..075722bb539 100644
--- a/tests/rustdoc-gui/item-info-alignment.goml
+++ b/tests/rustdoc-gui/item-info-alignment.goml
@@ -4,7 +4,9 @@ go-to: "file://" + |DOC_PATH| + "/lib2/struct.ItemInfoAlignmentTest.html"
 
 // First, we try it in "desktop" mode.
 set-window-size: (1200, 870)
+wait-for-size: ("body", {"width": 1200})
 compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ["x"])
 // Next, we try it in "mobile" mode (max-width: 700px).
 set-window-size: (650, 650)
+wait-for-size: ("body", {"width": 650})
 compare-elements-position: (".impl-items > .item-info", "summary > .item-info", ["x"])
diff --git a/tests/rustdoc-gui/item-info.goml b/tests/rustdoc-gui/item-info.goml
index 1636e149692..c775bf005dc 100644
--- a/tests/rustdoc-gui/item-info.goml
+++ b/tests/rustdoc-gui/item-info.goml
@@ -19,7 +19,7 @@ store-position: (
     "//*[@class='stab portability']//code[normalize-space()='Win32_System_Diagnostics']",
     {"x": second_line_x, "y": second_line_y},
 )
-assert: |first_line_x| != |second_line_x| && |first_line_x| == 516 && |second_line_x| == 272
+assert: |first_line_x| != |second_line_x| && |first_line_x| == 524 && |second_line_x| == 280
 assert: |first_line_y| != |second_line_y| && |first_line_y| == 718 && |second_line_y| == 741
 
 // Now we ensure that they're not rendered on the same line.
diff --git a/tests/rustdoc-gui/methods-left-margin.goml b/tests/rustdoc-gui/methods-left-margin.goml
index 1003cec33f9..31b53faf756 100644
--- a/tests/rustdoc-gui/methods-left-margin.goml
+++ b/tests/rustdoc-gui/methods-left-margin.goml
@@ -1,7 +1,6 @@
 // This test is to ensure that methods are correctly aligned on the left side.
 
 go-to: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
-
 // First we ensure that we have methods with and without documentation.
 assert: ".impl-items > details.method-toggle > summary > section.method"
 assert: ".impl-items > section.method"
diff --git a/tests/rustdoc-gui/notable-trait.goml b/tests/rustdoc-gui/notable-trait.goml
index e02974e6082..e04ace8a0d4 100644
--- a/tests/rustdoc-gui/notable-trait.goml
+++ b/tests/rustdoc-gui/notable-trait.goml
@@ -62,9 +62,9 @@ define-function: (
 // We start with a wide screen.
 set-window-size: (1100, 600)
 call-function: ("check-notable-tooltip-position-complete", {
-    "x": 677,
-    "i_x": 955,
-    "popover_x": 463,
+    "x": 685,
+    "i_x": 963,
+    "popover_x": 471,
 })
 
 // Now only the `i` should be on the next line.
@@ -78,16 +78,16 @@ compare-elements-position-false: (
 // Now both the `i` and the struct name should be on the next line.
 set-window-size: (980, 600)
 call-function: ("check-notable-tooltip-position", {
-    "x": 245,
-    "i_x": 523,
+    "x": 253,
+    "i_x": 531,
 })
 
 // Checking on mobile now.
 set-window-size: (650, 600)
 wait-for-size: ("body", {"width": 650})
 call-function: ("check-notable-tooltip-position-complete", {
-    "x": 25,
-    "i_x": 303,
+    "x": 26,
+    "i_x": 305,
     "popover_x": 0,
 })
 
diff --git a/tests/rustdoc-gui/toggle-docs-mobile.goml b/tests/rustdoc-gui/toggle-docs-mobile.goml
index b69aa6e30ca..be12e4c19b3 100644
--- a/tests/rustdoc-gui/toggle-docs-mobile.goml
+++ b/tests/rustdoc-gui/toggle-docs-mobile.goml
@@ -18,7 +18,7 @@ assert-position: ("#implementations-list > details > summary::before", {"x": 4})
 // Assert the position of the toggle on a method.
 assert-position: (
     "#trait-implementations-list .impl-items .method-toggle > summary::before",
-    {"x": 4},
+    {"x": 6},
 )
 
 // Now we do the same but with a little bigger width