diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-04-07 22:10:17 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2020-04-07 22:10:17 +0200 |
| commit | cbee6c5f0ca6dd1a1c5f073bd9e0e317f83bf2c5 (patch) | |
| tree | b4871f2b7c5966e088f305c3aa030e9d7452de78 | |
| parent | e1aa88c6a09a4410fe792c30e0454116335fba68 (diff) | |
| download | rust-cbee6c5f0ca6dd1a1c5f073bd9e0e317f83bf2c5.tar.gz rust-cbee6c5f0ca6dd1a1c5f073bd9e0e317f83bf2c5.zip | |
Extend sidebar scrollbar changes to all scrollbars
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 17 | ||||
| -rw-r--r-- | src/librustdoc/html/static/themes/dark.css | 18 | ||||
| -rw-r--r-- | src/librustdoc/html/static/themes/light.css | 19 |
3 files changed, 41 insertions, 13 deletions
diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 0ab130009ca..ab524751723 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -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; } diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css index 155492e8a6a..a2986c7b927 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -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); } diff --git a/src/librustdoc/html/static/themes/light.css b/src/librustdoc/html/static/themes/light.css index 488c34a61fb..be173d8eb46 100644 --- a/src/librustdoc/html/static/themes/light.css +++ b/src/librustdoc/html/static/themes/light.css @@ -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); } |
