about summary refs log tree commit diff
path: root/src/librustdoc/html/static/rustdoc.css
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-10-12 16:14:22 +0800
committerkennytm <kennytm@gmail.com>2017-10-13 01:58:36 +0800
commit445bbde7844eacb3de968e2584db2d44e6c4cbab (patch)
tree7a16afc1e827ce53ffc5a9f4e86918b6b77ae5be /src/librustdoc/html/static/rustdoc.css
parent1807f27a338e8e3f8c3a9c99fde2223b5942e640 (diff)
parent7ea286e854d88529af76ca486ed676c9fb06e8ee (diff)
downloadrust-445bbde7844eacb3de968e2584db2d44e6c4cbab.tar.gz
rust-445bbde7844eacb3de968e2584db2d44e6c4cbab.zip
Rollup merge of #44989 - QuietMisdreavus:what-is-your-quest, r=GuillaumeGomez
let rustdoc print the crate version into docs

This PR adds a new unstable flag to rustdoc, `--crate-version`, which when present will add a new entry to the sidebar of the root module, printing the given version number:

![Screenshot of a test crate, showing "Version 1.3.37" under the crate name](https://user-images.githubusercontent.com/5217170/31104096-805e3f4c-a7a0-11e7-96fc-368b6fe063d6.png)

Closes #24336

(The WIP status is because i don't want to merge this until i can get the std docs to use it, which i need help from rustbuild people to make sure i get right.)
Diffstat (limited to 'src/librustdoc/html/static/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/rustdoc.css9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 27574e67bc8..61a3902098f 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -203,6 +203,15 @@ nav.sub {
 	word-wrap: break-word;
 }
 
+.sidebar .version {
+	font-size: 15px;
+	text-align: center;
+	border-bottom: #DDDDDD 1px solid;
+	overflow-wrap: break-word;
+	word-wrap: break-word; /* deprecated */
+	word-break: break-word; /* Chrome, non-standard */
+}
+
 .location:empty {
 	border: none;
 }