Skip to content

Commit cbee6c5

Browse files
Extend sidebar scrollbar changes to all scrollbars
1 parent e1aa88c commit cbee6c5

File tree

3 files changed

+41
-13
lines changed

3 files changed

+41
-13
lines changed

src/librustdoc/html/static/rustdoc.css

+12-5
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,24 @@ nav.sub {
182182
top: 0;
183183
bottom: 0;
184184
overflow: auto;
185-
/* Improve the sidebar display on firefox */
185+
}
186+
187+
/* Improve the scrollbar display on firefox */
188+
* {
189+
scrollbar-width: initial;
190+
}
191+
.sidebar {
186192
scrollbar-width: thin;
187193
}
188194

189-
/* Improve the sidebar display on webkit-based browsers */
195+
/* Improve the scrollbar display on webkit-based browsers */
196+
::-webkit-scrollbar {
197+
width: 12px;
198+
}
190199
.sidebar::-webkit-scrollbar {
191200
width: 8px;
192201
}
193-
194-
/* Improve the sidebar display on webkit-based browsers */
195-
.sidebar::-webkit-scrollbar-track {
202+
::-webkit-scrollbar-track {
196203
-webkit-box-shadow: inset 0;
197204
}
198205

src/librustdoc/html/static/themes/dark.css

+14-4
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,26 @@ pre {
3030

3131
.sidebar {
3232
background-color: #505050;
33-
/* Improve the sidebar display on firefox */
33+
}
34+
35+
/* Improve the scrollbar display on firefox */
36+
* {
37+
scrollbar-color: rgb(64, 65, 67) #717171;
38+
}
39+
.sidebar {
3440
scrollbar-color: rgba(32,34,37,.6) transparent;
3541
}
3642

37-
/* Improve the sidebar display on webkit-based browsers */
43+
/* Improve the scrollbar display on webkit-based browsers */
44+
::-webkit-scrollbar-track {
45+
background-color: #717171;
46+
}
47+
::-webkit-scrollbar-thumb {
48+
background-color: rgba(32, 34, 37, .6);
49+
}
3850
.sidebar::-webkit-scrollbar-track {
3951
background-color: #717171;
4052
}
41-
42-
/* Improve the sidebar display on webkit-based browsers */
4353
.sidebar::-webkit-scrollbar-thumb {
4454
background-color: rgba(32, 34, 37, .6);
4555
}

src/librustdoc/html/static/themes/light.css

+15-4
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,27 @@ pre {
3232

3333
.sidebar {
3434
background-color: #F1F1F1;
35-
/* Improve the sidebar display on firefox */
35+
}
36+
37+
/* Improve the scrollbar display on firefox */
38+
* {
39+
scrollbar-color: rgba(36, 37, 39, 0.6) #e6e6e6;
40+
}
41+
42+
.sidebar {
3643
scrollbar-color: rgba(36, 37, 39, 0.6) #d9d9d9;
3744
}
3845

39-
/* Improve the sidebar display on webkit-based browsers */
46+
/* Improve the scrollbar display on webkit-based browsers */
47+
::-webkit-scrollbar-track {
48+
background-color: #ecebeb;
49+
}
50+
::-webkit-scrollbar-thumb {
51+
background-color: rgba(36, 37, 39, 0.6);
52+
}
4053
.sidebar::-webkit-scrollbar-track {
4154
background-color: #dcdcdc;
4255
}
43-
44-
/* Improve the sidebar display on webkit-based browsers */
4556
.sidebar::-webkit-scrollbar-thumb {
4657
background-color: rgba(36, 37, 39, 0.6);
4758
}

0 commit comments

Comments
 (0)