From 176624fb4bcc7702a2a0cd859fccc3dec8e2f1ae Mon Sep 17 00:00:00 2001 From: Marcel Hellwig <921462+hellow554@users.noreply.github.com> Date: Thu, 21 Dec 2017 17:10:45 +0100 Subject: [PATCH 1/4] add kbd style tag to main.css in rustdoc --- src/librustdoc/html/static/rustdoc.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index e620abea2777b..c5d1ced0db9d4 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1107,3 +1107,17 @@ h3.important { left: -42px; margin-top: 2px; } + +kbd { + display: inline-block; + padding: 3px 5px; + font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 10px; + color: #444d56; + vertical-align: middle; + background-color: #fafbfc; + border: solid 1px #d1d5da; + border-bottom-color: #c6cbd1; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #c6cbd1; +} From 6e741df1bd252e9b9d9972dc7f689890686a2b1e Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Fri, 22 Dec 2017 13:29:02 +0100 Subject: [PATCH 2/4] moved colors of kbd tag into main.css --- src/librustdoc/html/static/rustdoc.css | 7 ++----- src/librustdoc/html/static/styles/main.css | 9 +++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index c5d1ced0db9d4..40df2cb76176f 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1113,11 +1113,8 @@ kbd { padding: 3px 5px; font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; - color: #444d56; vertical-align: middle; - background-color: #fafbfc; - border: solid 1px #d1d5da; - border-bottom-color: #c6cbd1; + border: solid 1px; border-radius: 3px; - box-shadow: inset 0 -1px 0 #c6cbd1; + box-shadow: inset 0 -1px 0; } diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index c31808cfc0f6d..df8facccafa1f 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -343,3 +343,12 @@ pre.ignore:hover, .information:hover + pre.ignore { border-right-color: #000; } } + +kbd { + color: #444d56; + background-color: #fafbfc; + border-color: #d1d5da; + border-bottom-color: #c6cbd1; + box-shadow-color: #c6cbd1; +} + From 38e5d304fe72a49dc6fbac1870546620e3557680 Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Mon, 15 Jan 2018 18:12:38 +0100 Subject: [PATCH 3/4] extended dt with kbd tags removed styling of dt tages, which would make them look like keys and added tag inside of dt tag. Added css style for kbd and removed some stylings for dt --- src/librustdoc/html/layout.rs | 18 ++++++++++-------- src/librustdoc/html/static/rustdoc.css | 15 +++++---------- src/librustdoc/html/static/styles/main.css | 5 ----- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 61de5f4bc4c45..3a18c6b8a809e 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -94,20 +94,22 @@ r##"

Keyboard Shortcuts

-
?
+
?
Show this help dialog
-
S
+
S
Focus the search field
-
+
Move up in search results
-
+
Move down in search results
-
+
Switch tab
-
+
Go to active search result
-
+ / -
-
Collapse/expand all sections
+
+
+
Expand all sections
+
-
+
Collapse all sections
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 40df2cb76176f..bc2a5e663a18e 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -585,18 +585,13 @@ body.blur > :not(#help) { flex: 0 0 auto; box-shadow: 0 0 6px rgba(0,0,0,.2); width: 550px; - height: 354px; + height: auto; border: 1px solid; } #help dt { - float: left; - border-radius: 4px; - border: 1px solid; - width: 23px; - text-align: center; - clear: left; - display: block; - margin-top: -1px; + float: left; + clear: left; + display: block; } #help dd { margin: 5px 35px; } #help .infos { padding-left: 0; } @@ -1111,7 +1106,7 @@ h3.important { kbd { display: inline-block; padding: 3px 5px; - font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font: 15px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; vertical-align: middle; border: solid 1px; diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index df8facccafa1f..e28a328cca64d 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -194,11 +194,6 @@ a.test-arrow { border-color: #bfbfbf;; } -#help dt { - border-color: #bfbfbf; - background: #fff; -} - .since { color: grey; } From 0c946c01795b8a3c05273805764ca5d90cb1af60 Mon Sep 17 00:00:00 2001 From: Marcel Hellwig Date: Thu, 18 Jan 2018 09:06:55 +0100 Subject: [PATCH 4/4] converted space to tab in css files --- src/librustdoc/html/static/rustdoc.css | 6 +++--- src/librustdoc/html/static/styles/main.css | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index bc2a5e663a18e..0f972927d8ecc 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -589,9 +589,9 @@ body.blur > :not(#help) { border: 1px solid; } #help dt { - float: left; - clear: left; - display: block; + float: left; + clear: left; + display: block; } #help dd { margin: 5px 35px; } #help .infos { padding-left: 0; } diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index e28a328cca64d..d4964376af261 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -340,10 +340,9 @@ pre.ignore:hover, .information:hover + pre.ignore { } kbd { - color: #444d56; - background-color: #fafbfc; - border-color: #d1d5da; - border-bottom-color: #c6cbd1; - box-shadow-color: #c6cbd1; + color: #444d56; + background-color: #fafbfc; + border-color: #d1d5da; + border-bottom-color: #c6cbd1; + box-shadow-color: #c6cbd1; } -