Skip to content

Commit 5692e16

Browse files
committed
Auto merge of #28963 - mdinger:arrow, r=steveklabnik
This is to make the link more prominent so hopefully people will actually see it. The new icon is partially because I wasn't sure how easy it would be to apply the previous transformations only to the last character of the string. As it is, I wasn't sure at first but I think the look is growing on me. A minor nitpick is that the space after `Runnable` is underlined and I tried to fix that but it wasn't working for me right now. I tried switching a link with subelements to a div with subelements but I missed something because it wasn't working correctly. --- Unselected: ![arrow](https://cloud.githubusercontent.com/assets/4156987/10414475/b1730ab2-6fa4-11e5-9062-15bc0c7c8b96.png) --- Selected: ![arrow_selected](https://cloud.githubusercontent.com/assets/4156987/10414483/4a78088e-6fa5-11e5-864e-c83f354769b1.png) Fixes #28958
2 parents e7690e7 + dd342b0 commit 5692e16

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/librustdoc/html/static/main.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,17 @@ pre.rust .lifetime { color: #B76514; }
559559

560560
.rusttest { display: none; }
561561
pre.rust { position: relative; }
562-
.test-arrow {
562+
a.test-arrow {
563563
display: inline-block;
564564
position: absolute;
565-
top: 0;
566-
right: 10px;
567-
font-size: 150%;
568-
-webkit-transform: scaleX(-1);
569-
transform: scaleX(-1);
565+
566+
background-color: #4e8bca;
567+
color: #f5f5f5;
568+
padding: 5px 10px 5px 10px;
569+
border-radius: 5px;
570+
font-size: 130%;
571+
top: 5px;
572+
right: 5px;
570573
}
571574

572575
.methods .section-header {

src/librustdoc/html/static/playpen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ document.addEventListener('DOMContentLoaded', function() {
2828
}
2929

3030
var a = document.createElement('a');
31-
a.textContent = '⇱';
3231
a.setAttribute('class', 'test-arrow');
32+
a.textContent = 'Run';
3333

3434
var code = el.previousElementSibling.textContent;
3535

0 commit comments

Comments
 (0)