Skip to content

Commit 34c1b25

Browse files
committed
rustdoc: use a different style of grip track
1 parent 8780d5f commit 34c1b25

File tree

2 files changed

+31
-30
lines changed

2 files changed

+31
-30
lines changed

src/librustdoc/html/static/css/noscript.css

+2-4
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ nav.sub {
136136
--scrape-example-code-wrapper-background-end: rgba(255, 255, 255, 0);
137137
--sidebar-resizer-hover: hsl(207, 90%, 66%);
138138
--sidebar-resizer-active: hsl(207, 90%, 54%);
139-
--sidebar-resizer-img-filter: opacity(66%);
140-
--sidebar-resizer-img-hover-filter: none;
139+
--sidebar-resizer-shadow: #ccc;
141140
}
142141
/* End theme: light */
143142

@@ -248,8 +247,7 @@ nav.sub {
248247
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
249248
--sidebar-resizer-hover: hsl(207, 30%, 54%);
250249
--sidebar-resizer-active: hsl(207, 90%, 54%);
251-
--sidebar-resizer-img-filter: opacity(66%);
252-
--sidebar-resizer-img-hover-filter: none;
250+
--sidebar-resizer-shadow: #000;
253251
}
254252
/* End theme: dark */
255253
}

src/librustdoc/html/static/css/rustdoc.css

+29-26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
/* ignore-tidy-filelength */
12
/*
2-
// ignore-tidy-filelength
33
When static files are updated, their suffixes need to be updated.
44
1. In the top directory run:
55
./x.py doc --stage 1 library/core
@@ -522,25 +522,33 @@ img {
522522
left: var(--desktop-sidebar-width);
523523
display: flex;
524524
align-items: center;
525-
justify-content: center;
525+
justify-content: flex-start;
526526
}
527-
528527
.sidebar-resizer::after {
529-
content: url('data:image/svg+xml,\
530-
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="24" viewBox="0 0 8 24"> \
531-
<linearGradient id="x" x1="0" x2="0" y1="0" y2="1"> \
532-
<stop offset="0.5" stop-color="%23666"/><stop offset="0.5" stop-color="%23ccc"/> \
533-
</linearGradient> \
534-
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="21" cx="3"/> \
535-
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="15" cx="3"/> \
536-
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="9" cx="3"/> \
537-
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="3" cx="3"/></svg>');
528+
content: "";
529+
background: linear-gradient(
530+
0.25turn,
531+
transparent 0px,
532+
transparent 2px,
533+
var(--sidebar-border-color) 2px,
534+
var(--sidebar-border-color) 3px,
535+
var(--sidebar-resizer-shadow) 3px,
536+
var(--sidebar-resizer-shadow) 4px,
537+
transparent 4px,
538+
transparent 6px,
539+
var(--sidebar-border-color) 6px,
540+
var(--sidebar-border-color) 7px,
541+
var(--sidebar-resizer-shadow) 7px,
542+
var(--sidebar-resizer-shadow) 8px,
543+
transparent 8px
544+
);
545+
border: solid 1px var(--sidebar-border-color);
546+
border-left: none;
547+
border-right: solid 1px var(--sidebar-resizer-shadow);
548+
border-bottom: solid 1px var(--sidebar-resizer-shadow);
538549
width: 8px;
539550
height: 24px;
540-
filter: var(--sidebar-resizer-img-filter);
541-
}
542-
.sidebar-resizer:hover::after {
543-
filter: var(--sidebar-resizer-img-hover-filter);
551+
image-rendering: crisp-edges;
544552
}
545553

546554
.rustdoc.src .sidebar-resizer {
@@ -614,8 +622,6 @@ img {
614622
}
615623
.sidebar-resizer.active::before {
616624
border-left: solid 2px var(--sidebar-resizer-active);
617-
margin-left: 8px;
618-
padding-left: 1px;
619625
display: block;
620626
height: 100%;
621627
content: "";
@@ -3017,8 +3023,7 @@ by default.
30173023
--scrape-example-code-wrapper-background-end: rgba(255, 255, 255, 0);
30183024
--sidebar-resizer-hover: hsl(207, 90%, 66%);
30193025
--sidebar-resizer-active: hsl(207, 90%, 54%);
3020-
--sidebar-resizer-img-filter: opacity(66%);
3021-
--sidebar-resizer-img-hover-filter: none;
3026+
--sidebar-resizer-shadow: #ccc;
30223027
}
30233028
/* End theme: light */
30243029

@@ -3032,7 +3037,7 @@ by default.
30323037
--settings-button-border-focus: #ffb900;
30333038
--sidebar-background-color: #505050;
30343039
--sidebar-background-color-hover: #676767;
3035-
--sidebar-border-color: #2A2A2A;
3040+
--sidebar-border-color: #999;
30363041
--code-block-background-color: #2A2A2A;
30373042
--scrollbar-track-background-color: #717171;
30383043
--scrollbar-thumb-background-color: rgba(32, 34, 37, .6);
@@ -3128,8 +3133,7 @@ by default.
31283133
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
31293134
--sidebar-resizer-hover: hsl(207, 30%, 54%);
31303135
--sidebar-resizer-active: hsl(207, 90%, 54%);
3131-
--sidebar-resizer-img-filter: opacity(66%);
3132-
--sidebar-resizer-img-hover-filter: none;
3136+
--sidebar-resizer-shadow: #000;
31333137
}
31343138
/* End theme: dark */
31353139

@@ -3147,7 +3151,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
31473151
--settings-button-border-focus: #e0e0e0;
31483152
--sidebar-background-color: #14191f;
31493153
--sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
3150-
--sidebar-border-color: #000;
3154+
--sidebar-border-color: #5c6773;
31513155
--code-block-background-color: #191f26;
31523156
--scrollbar-track-background-color: transparent;
31533157
--scrollbar-thumb-background-color: #5c6773;
@@ -3243,8 +3247,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
32433247
--scrape-example-code-wrapper-background-end: rgba(15, 20, 25, 0);
32443248
--sidebar-resizer-hover: hsl(34, 50%, 33%);
32453249
--sidebar-resizer-active: hsl(34, 100%, 66%);
3246-
--sidebar-resizer-img-filter: opacity(66%);
3247-
--sidebar-resizer-img-hover-filter: none;
3250+
--sidebar-resizer-shadow: #000;
32483251
}
32493252

32503253
:root[data-theme="ayu"] h1,

0 commit comments

Comments
 (0)