From dd717deccb3a4698beac8edb0a75e2efb6f08ebb Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 1 Oct 2018 00:47:54 +0200 Subject: Add crate filtering --- src/librustdoc/html/static/rustdoc.css | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/librustdoc/html/static/rustdoc.css') diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 1ae3b0b88c6..cbf55c12244 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -614,13 +614,32 @@ a { .search-container { position: relative; } +.search-container > div { + display: inline-flex; + width: calc(100% - 34px); +} +#crate-search { + margin-top: 5px; + padding: 6px; + padding-right: 12px; + border: 0; + border-right: 0; + border-radius: 4px 0 0 4px; + outline: none; + cursor: pointer; + border-right: 1px solid; + -moz-appearance: none; + -webkit-appearance: none; + /* Removes default arrow from firefox */ + text-indent: 0.01px; + text-overflow: ""; +} .search-container > .top-button { position: absolute; right: 0; top: 10px; } .search-input { - width: calc(100% - 34px); /* Override Normalize.css: we have margins and do not want to overflow - the `moz` attribute is necessary until Firefox 29, too early to drop at this point */ @@ -628,13 +647,14 @@ a { box-sizing: border-box !important; outline: none; border: none; - border-radius: 1px; + border-radius: 0 1px 1px 0; margin-top: 5px; padding: 10px 16px; font-size: 17px; transition: border-color 300ms ease; transition: border-radius 300ms ease-in-out; transition: box-shadow 300ms ease-in-out; + width: 100%; } .search-input:focus { -- cgit 1.4.1-3-g733a5 From afe41078add129c821a16f5f7fb6e667c34c153d Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 29 Nov 2018 01:29:49 +0100 Subject: Add arrow to the crate select box --- src/librustdoc/html/layout.rs | 3 +++ src/librustdoc/html/render.rs | 2 ++ src/librustdoc/html/static/down-arrow.svg | 1 + src/librustdoc/html/static/rustdoc.css | 6 +++++- src/librustdoc/html/static_files.rs | 3 +++ 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/librustdoc/html/static/down-arrow.svg (limited to 'src/librustdoc/html/static/rustdoc.css') diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index d585b737517..3a2a6f4c6b9 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -57,6 +57,9 @@ pub fn render( {css_extension}\ {favicon}\ {in_header}\ + \ \ \