diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index accd609306978..26c1eb5389fa9 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -290,20 +290,21 @@ p:last-child {
button {
/* Buttons on Safari have different default padding than other platforms. Make them the same. */
padding: 1px 6px;
+ /* Opinionated tweak: use pointer cursor as clickability signifier. */
+ cursor: pointer;
}
+/* end tweaks for normalize.css 8 */
+
button#toggle-all-docs {
padding: 0;
background: none;
border: none;
- cursor: pointer;
/* iOS button gradient: https://stackoverflow.com/q/5438567 */
-webkit-appearance: none;
opacity: 1;
}
-/* end tweaks for normalize.css 8 */
-
.rustdoc {
display: flex;
flex-direction: row;
@@ -1305,7 +1306,6 @@ a.test-arrow:hover {
#titles > button {
text-align: center;
font-size: 1.125rem;
- cursor: pointer;
border: 0;
border-top: 2px solid;
flex: 1;
@@ -1345,7 +1345,6 @@ a.test-arrow:hover {
font-weight: bold;
background: none;
color: inherit;
- cursor: pointer;
text-align: center;
border: none;
outline: none;
@@ -1367,7 +1366,6 @@ a.test-arrow:hover {
#settings-menu > a, #help-button > a, #copy-path {
width: 33px;
- cursor: pointer;
line-height: 1.5;
}
@@ -1796,7 +1794,6 @@ in storage.js
z-index: 10;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
- cursor: pointer;
border: 1px solid;
border-left: 0;
}
@@ -1967,7 +1964,6 @@ in storage.js
position: absolute;
top: 0.25em;
z-index: 1;
- cursor: pointer;
padding: 0;
background: none;
border: none;
diff --git a/src/test/rustdoc-gui/cursor.goml b/src/test/rustdoc-gui/cursor.goml
new file mode 100644
index 0000000000000..b2e91cb81fba7
--- /dev/null
+++ b/src/test/rustdoc-gui/cursor.goml
@@ -0,0 +1,24 @@
+// This test ensures that several clickable items actually have the pointer cursor.
+goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
+
+// the `[+]/[-]` button
+assert-css: ("#toggle-all-docs", {"cursor": "pointer"})
+
+// the button next to the path header
+assert-css: ("#copy-path", {"cursor": "pointer"})
+
+// the search tabs
+write: (".search-input", "Foo")
+// To be SURE that the search will be run.
+press-key: 'Enter'
+// Waiting for the search results to appear...
+wait-for: "#titles"
+assert-css: ("#titles > button", {"cursor": "pointer"})
+
+// mobile sidebar toggle button
+size: (500, 700)
+assert-css: (".sidebar-menu-toggle", {"cursor": "pointer"})
+
+// the sidebar toggle button on the source code pages
+goto: "file://" + |DOC_PATH| + "/src/lib2/lib.rs.html"
+assert-css: ("#sidebar-toggle > button", {"cursor": "pointer"})