Skip to content

Commit

Permalink
Improve ayu rustdoc theme
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Aloso committed Jul 15, 2020
1 parent 7e11379 commit ef6c026
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/librustdoc/html/static/themes/ayu.css
Expand Up @@ -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;
Expand Down Expand Up @@ -108,7 +113,7 @@ pre {
}

.sidebar .version {
border-bottom-color: #DDD;
border-bottom-color: #424c57;
}

.sidebar-title {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ef6c026

Please sign in to comment.