Skip to content

Commit 1a9e469

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

File tree

2 files changed

+19
-39
lines changed

2 files changed

+19
-39
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ 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;
141139
}
142140
/* End theme: light */
143141

@@ -248,8 +246,6 @@ nav.sub {
248246
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
249247
--sidebar-resizer-hover: hsl(207, 30%, 54%);
250248
--sidebar-resizer-active: hsl(207, 90%, 54%);
251-
--sidebar-resizer-img-filter: opacity(66%);
252-
--sidebar-resizer-img-hover-filter: none;
253249
}
254250
/* End theme: dark */
255251
}

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

Lines changed: 19 additions & 35 deletions
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,20 @@ img {
522522
left: var(--desktop-sidebar-width);
523523
display: flex;
524524
align-items: center;
525-
justify-content: center;
525+
justify-content: flex-start;
526+
color: var(--sidebar-border-color);
526527
}
527-
528-
.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>');
538-
width: 8px;
539-
height: 24px;
540-
filter: var(--sidebar-resizer-img-filter);
528+
.sidebar-resizer::before {
529+
content: "";
530+
border-right: dotted 2px currentColor;
531+
width: 2px;
532+
height: 12px;
541533
}
542-
.sidebar-resizer:hover::after {
543-
filter: var(--sidebar-resizer-img-hover-filter);
534+
.sidebar-resizer::after {
535+
content: "";
536+
border-right: dotted 2px currentColor;
537+
width: 2px;
538+
height: 16px;
544539
}
545540

546541
.rustdoc.src .sidebar-resizer {
@@ -568,6 +563,7 @@ img {
568563

569564
.sidebar-resizing .sidebar {
570565
position: fixed;
566+
border-right: solid 2px var(--sidebar-resizer-active);
571567
}
572568
.sidebar-resizing > body {
573569
padding-left: var(--resizing-sidebar-width);
@@ -583,6 +579,7 @@ img {
583579
on top of, the scrollbar) */
584580
left: calc(var(--desktop-sidebar-width) - 1px);
585581
border-left: solid 1px var(--sidebar-resizer-hover);
582+
color: var(--sidebar-resizer-hover);
586583
}
587584

588585
.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,
@@ -608,17 +605,10 @@ img {
608605
/* make the resize tool bigger when actually resizing, to avoid :hover styles on other stuff
609606
while resizing */
610607
padding: 0 140px;
611-
width: 2px;
608+
width: calc(140px + 140px + 9px + 2px);
612609
margin-left: -140px;
613610
border-left: none;
614-
}
615-
.sidebar-resizer.active::before {
616-
border-left: solid 2px var(--sidebar-resizer-active);
617-
margin-left: 8px;
618-
padding-left: 1px;
619-
display: block;
620-
height: 100%;
621-
content: "";
611+
color: var(--sidebar-resizer-active);
622612
}
623613

624614
.sidebar, .mobile-topbar, .sidebar-menu-toggle,
@@ -3017,8 +3007,6 @@ by default.
30173007
--scrape-example-code-wrapper-background-end: rgba(255, 255, 255, 0);
30183008
--sidebar-resizer-hover: hsl(207, 90%, 66%);
30193009
--sidebar-resizer-active: hsl(207, 90%, 54%);
3020-
--sidebar-resizer-img-filter: opacity(66%);
3021-
--sidebar-resizer-img-hover-filter: none;
30223010
}
30233011
/* End theme: light */
30243012

@@ -3032,7 +3020,7 @@ by default.
30323020
--settings-button-border-focus: #ffb900;
30333021
--sidebar-background-color: #505050;
30343022
--sidebar-background-color-hover: #676767;
3035-
--sidebar-border-color: #2A2A2A;
3023+
--sidebar-border-color: #999;
30363024
--code-block-background-color: #2A2A2A;
30373025
--scrollbar-track-background-color: #717171;
30383026
--scrollbar-thumb-background-color: rgba(32, 34, 37, .6);
@@ -3128,8 +3116,6 @@ by default.
31283116
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
31293117
--sidebar-resizer-hover: hsl(207, 30%, 54%);
31303118
--sidebar-resizer-active: hsl(207, 90%, 54%);
3131-
--sidebar-resizer-img-filter: opacity(66%);
3132-
--sidebar-resizer-img-hover-filter: none;
31333119
}
31343120
/* End theme: dark */
31353121

@@ -3147,7 +3133,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
31473133
--settings-button-border-focus: #e0e0e0;
31483134
--sidebar-background-color: #14191f;
31493135
--sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
3150-
--sidebar-border-color: #000;
3136+
--sidebar-border-color: #5c6773;
31513137
--code-block-background-color: #191f26;
31523138
--scrollbar-track-background-color: transparent;
31533139
--scrollbar-thumb-background-color: #5c6773;
@@ -3243,8 +3229,6 @@ Original by Dempfi (https://github.com/dempfi/ayu)
32433229
--scrape-example-code-wrapper-background-end: rgba(15, 20, 25, 0);
32443230
--sidebar-resizer-hover: hsl(34, 50%, 33%);
32453231
--sidebar-resizer-active: hsl(34, 100%, 66%);
3246-
--sidebar-resizer-img-filter: opacity(66%);
3247-
--sidebar-resizer-img-hover-filter: none;
32483232
}
32493233

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

0 commit comments

Comments
 (0)