From ef6c0263b0fee291d31e3f3d49468b6df3eeff6c Mon Sep 17 00:00:00 2001 From: Ludwig Stecher Date: Wed, 15 Jul 2020 18:18:59 +0200 Subject: [PATCH 1/2] Improve ayu rustdoc theme * It makes some lines darker * It gives the crate selector and search bar a border * The search bar's border turns blue when focused * Gives the logo a bright shadow. This makes dark logos stand out more --- src/librustdoc/html/static/themes/ayu.css | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/librustdoc/html/static/themes/ayu.css b/src/librustdoc/html/static/themes/ayu.css index bc21c28750fd8..cbb61bb45cc74 100644 --- a/src/librustdoc/html/static/themes/ayu.css +++ b/src/librustdoc/html/static/themes/ayu.css @@ -70,6 +70,11 @@ pre { scrollbar-color: #5c6773 transparent; } +.logo-container > img { + /* Make dark logos better visible in supported browsers */ + filter: drop-shadow(0 0 30px rgba(255,255,255,0.7)); +} + /* Improve the scrollbar display on webkit-based browsers */ ::-webkit-scrollbar-track { background-color: transparent; @@ -108,7 +113,7 @@ pre { } .sidebar .version { - border-bottom-color: #DDD; + border-bottom-color: #424c57; } .sidebar-title { @@ -198,7 +203,7 @@ pre.rust .comment, pre.rust .doccomment { } nav:not(.sidebar) { - border-bottom-color: #e0e0e0; + border-bottom-color: #424c57; } nav.main .current { border-top-color: #5c6773; @@ -227,22 +232,19 @@ a { #crate-search { color: #c5c5c5; background-color: #141920; - border-radius: 4px; - box-shadow: none; - border-color: #5c6773; + box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent; + border-color: #424c57; } .search-input { color: #ffffff; background-color: #141920; - box-shadow: none; + box-shadow: 0 0 0 1px #424c57,0 0 0 2px transparent; transition: box-shadow 150ms ease-in-out; - border-radius: 4px; - margin-left: 8px; } #crate-search+.search-input:focus { - box-shadow: 0px 6px 20px 0px black; + box-shadow: 0 0 0 1px #148099,0 0 0 2px transparent; } .search-focus:disabled { From d08bb4037e6a3fea6d85909ab64d3d4192dff611 Mon Sep 17 00:00:00 2001 From: Ludwig Stecher Date: Wed, 15 Jul 2020 20:28:42 +0200 Subject: [PATCH 2/2] Remove drop-shadow --- src/librustdoc/html/static/themes/ayu.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/librustdoc/html/static/themes/ayu.css b/src/librustdoc/html/static/themes/ayu.css index cbb61bb45cc74..cc7870a408d02 100644 --- a/src/librustdoc/html/static/themes/ayu.css +++ b/src/librustdoc/html/static/themes/ayu.css @@ -70,11 +70,6 @@ pre { scrollbar-color: #5c6773 transparent; } -.logo-container > img { - /* Make dark logos better visible in supported browsers */ - filter: drop-shadow(0 0 30px rgba(255,255,255,0.7)); -} - /* Improve the scrollbar display on webkit-based browsers */ ::-webkit-scrollbar-track { background-color: transparent;