Skip to content

Commit 38e5d30

Browse files
committed
extended dt with kbd tags
removed styling of dt tages, which would make them look like keys and added <kbd> tag inside of dt tag. Added css style for kbd and removed some stylings for dt
1 parent 6e741df commit 38e5d30

File tree

3 files changed

+15
-23
lines changed

3 files changed

+15
-23
lines changed

src/librustdoc/html/layout.rs

+10-8
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,22 @@ r##"<!DOCTYPE html>
9494
<h2>Keyboard Shortcuts</h2>
9595
9696
<dl>
97-
<dt>?</dt>
97+
<dt><kbd>?</kbd></dt>
9898
<dd>Show this help dialog</dd>
99-
<dt>S</dt>
99+
<dt><kbd>S</kbd></dt>
100100
<dd>Focus the search field</dd>
101-
<dt></dt>
101+
<dt><kbd>↑</kbd></dt>
102102
<dd>Move up in search results</dd>
103-
<dt></dt>
103+
<dt><kbd>↓</kbd></dt>
104104
<dd>Move down in search results</dd>
105-
<dt></dt>
105+
<dt><kbd>↹</kbd></dt>
106106
<dd>Switch tab</dd>
107-
<dt>&#9166;</dt>
107+
<dt><kbd>&#9166;</kbd></dt>
108108
<dd>Go to active search result</dd>
109-
<dt style="width:31px;">+ / -</dt>
110-
<dd>Collapse/expand all sections</dd>
109+
<dt><kbd>+</kbd></dt>
110+
<dd>Expand all sections</dd>
111+
<dt><kbd>-</kbd></dt>
112+
<dd>Collapse all sections</dd>
111113
</dl>
112114
</div>
113115

src/librustdoc/html/static/rustdoc.css

+5-10
Original file line numberDiff line numberDiff line change
@@ -585,18 +585,13 @@ body.blur > :not(#help) {
585585
flex: 0 0 auto;
586586
box-shadow: 0 0 6px rgba(0,0,0,.2);
587587
width: 550px;
588-
height: 354px;
588+
height: auto;
589589
border: 1px solid;
590590
}
591591
#help dt {
592-
float: left;
593-
border-radius: 4px;
594-
border: 1px solid;
595-
width: 23px;
596-
text-align: center;
597-
clear: left;
598-
display: block;
599-
margin-top: -1px;
592+
float: left;
593+
clear: left;
594+
display: block;
600595
}
601596
#help dd { margin: 5px 35px; }
602597
#help .infos { padding-left: 0; }
@@ -1111,7 +1106,7 @@ h3.important {
11111106
kbd {
11121107
display: inline-block;
11131108
padding: 3px 5px;
1114-
font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
1109+
font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
11151110
line-height: 10px;
11161111
vertical-align: middle;
11171112
border: solid 1px;

src/librustdoc/html/static/styles/main.css

-5
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,6 @@ a.test-arrow {
194194
border-color: #bfbfbf;;
195195
}
196196

197-
#help dt {
198-
border-color: #bfbfbf;
199-
background: #fff;
200-
}
201-
202197
.since {
203198
color: grey;
204199
}

0 commit comments

Comments
 (0)