about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2022-11-12 17:25:04 +0100
committerGitHub <noreply@github.com>2022-11-12 17:25:04 +0100
commitd532d6782195effb702d4e402dd2d6371af1c349 (patch)
tree5bf21700cbf7a7af5059e08df72085199bc40d1b /src
parentf48dba142299733a3ea4a763d44c2028dc4de03a (diff)
parentc645d3e0637f8fccfab0f00b9ac3c701a37bb480 (diff)
downloadrust-d532d6782195effb702d4e402dd2d6371af1c349.tar.gz
rust-d532d6782195effb702d4e402dd2d6371af1c349.zip
Rollup merge of #104319 - GuillaumeGomez:fix-non-clickable-source-link, r=notriddle
Fix non clickable source link

Fixes https://github.com/rust-lang/rust/issues/104313.

It was also fixed in https://github.com/rust-lang/rust/pull/104177. If https://github.com/rust-lang/rust/pull/104177 is merged first, I'll simply remove the first commit to keep the test.

r? ``@notriddle``
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css2
-rw-r--r--src/test/rustdoc-gui/src-font-size.goml5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 6a068a3d243..2a39a371f48 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -183,8 +183,6 @@ h4.code-header {
 	font-weight: 600;
 	margin: 0;
 	padding: 0;
-	/* position notable traits in mobile mode within the header */
-	position: relative;
 }
 
 #crate-search,
diff --git a/src/test/rustdoc-gui/src-font-size.goml b/src/test/rustdoc-gui/src-font-size.goml
index b17dfd94cf0..9233f37444b 100644
--- a/src/test/rustdoc-gui/src-font-size.goml
+++ b/src/test/rustdoc-gui/src-font-size.goml
@@ -9,3 +9,8 @@ assert-css: (".impl.has-srclink .code-header", {"font-size": "18px", "font-weigh
 // Check the impl items.
 assert-css: (".impl-items .has-srclink .srclink", {"font-size": "16px", "font-weight": 400}, ALL)
 assert-css: (".impl-items .has-srclink .code-header", {"font-size": "16px", "font-weight": 600}, ALL)
+
+// Check that we can click on source link
+store-document-property: (url, "URL")
+click: ".impl-items .has-srclink .srclink"
+assert-document-property-false: {"URL": |url|}