Skip to content

Commit

Permalink
Extend sidebar scrollbar changes to all scrollbars
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 7, 2020
1 parent e1aa88c commit cbee6c5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 13 deletions.
17 changes: 12 additions & 5 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,24 @@ nav.sub {
top: 0;
bottom: 0;
overflow: auto;
/* Improve the sidebar display on firefox */
}

/* Improve the scrollbar display on firefox */
* {
scrollbar-width: initial;
}
.sidebar {
scrollbar-width: thin;
}

/* Improve the sidebar display on webkit-based browsers */
/* Improve the scrollbar display on webkit-based browsers */
::-webkit-scrollbar {
width: 12px;
}
.sidebar::-webkit-scrollbar {
width: 8px;
}

/* Improve the sidebar display on webkit-based browsers */
.sidebar::-webkit-scrollbar-track {
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0;
}

Expand Down
18 changes: 14 additions & 4 deletions src/librustdoc/html/static/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,26 @@ pre {

.sidebar {
background-color: #505050;
/* Improve the sidebar display on firefox */
}

/* Improve the scrollbar display on firefox */
* {
scrollbar-color: rgb(64, 65, 67) #717171;
}
.sidebar {
scrollbar-color: rgba(32,34,37,.6) transparent;
}

/* Improve the sidebar display on webkit-based browsers */
/* Improve the scrollbar display on webkit-based browsers */
::-webkit-scrollbar-track {
background-color: #717171;
}
::-webkit-scrollbar-thumb {
background-color: rgba(32, 34, 37, .6);
}
.sidebar::-webkit-scrollbar-track {
background-color: #717171;
}

/* Improve the sidebar display on webkit-based browsers */
.sidebar::-webkit-scrollbar-thumb {
background-color: rgba(32, 34, 37, .6);
}
Expand Down
19 changes: 15 additions & 4 deletions src/librustdoc/html/static/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,27 @@ pre {

.sidebar {
background-color: #F1F1F1;
/* Improve the sidebar display on firefox */
}

/* Improve the scrollbar display on firefox */
* {
scrollbar-color: rgba(36, 37, 39, 0.6) #e6e6e6;
}

.sidebar {
scrollbar-color: rgba(36, 37, 39, 0.6) #d9d9d9;
}

/* Improve the sidebar display on webkit-based browsers */
/* Improve the scrollbar display on webkit-based browsers */
::-webkit-scrollbar-track {
background-color: #ecebeb;
}
::-webkit-scrollbar-thumb {
background-color: rgba(36, 37, 39, 0.6);
}
.sidebar::-webkit-scrollbar-track {
background-color: #dcdcdc;
}

/* Improve the sidebar display on webkit-based browsers */
.sidebar::-webkit-scrollbar-thumb {
background-color: rgba(36, 37, 39, 0.6);
}
Expand Down

0 comments on commit cbee6c5

Please sign in to comment.