rustdoc: use a different style of grip track

This commit is contained in:
Michael Howell 2025-04-10 21:44:35 -07:00
parent 8780d5fd6e
commit 34c1b25ae7
2 changed files with 31 additions and 30 deletions

View File

@ -136,8 +136,7 @@ nav.sub {
--scrape-example-code-wrapper-background-end: rgba(255, 255, 255, 0);
--sidebar-resizer-hover: hsl(207, 90%, 66%);
--sidebar-resizer-active: hsl(207, 90%, 54%);
--sidebar-resizer-img-filter: opacity(66%);
--sidebar-resizer-img-hover-filter: none;
--sidebar-resizer-shadow: #ccc;
}
/* End theme: light */
@ -248,8 +247,7 @@ nav.sub {
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
--sidebar-resizer-hover: hsl(207, 30%, 54%);
--sidebar-resizer-active: hsl(207, 90%, 54%);
--sidebar-resizer-img-filter: opacity(66%);
--sidebar-resizer-img-hover-filter: none;
--sidebar-resizer-shadow: #000;
}
/* End theme: dark */
}

View File

@ -1,5 +1,5 @@
/* ignore-tidy-filelength */
/*
// ignore-tidy-filelength
When static files are updated, their suffixes need to be updated.
1. In the top directory run:
./x.py doc --stage 1 library/core
@ -522,25 +522,33 @@ img {
left: var(--desktop-sidebar-width);
display: flex;
align-items: center;
justify-content: center;
justify-content: flex-start;
}
.sidebar-resizer::after {
content: url('data:image/svg+xml,\
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="24" viewBox="0 0 8 24"> \
<linearGradient id="x" x1="0" x2="0" y1="0" y2="1"> \
<stop offset="0.5" stop-color="%23666"/><stop offset="0.5" stop-color="%23ccc"/> \
</linearGradient> \
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="21" cx="3"/> \
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="15" cx="3"/> \
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="9" cx="3"/> \
<circle r="2" fill="none" stroke-width="2" stroke="url(%23x)" cy="3" cx="3"/></svg>');
content: "";
background: linear-gradient(
0.25turn,
transparent 0px,
transparent 2px,
var(--sidebar-border-color) 2px,
var(--sidebar-border-color) 3px,
var(--sidebar-resizer-shadow) 3px,
var(--sidebar-resizer-shadow) 4px,
transparent 4px,
transparent 6px,
var(--sidebar-border-color) 6px,
var(--sidebar-border-color) 7px,
var(--sidebar-resizer-shadow) 7px,
var(--sidebar-resizer-shadow) 8px,
transparent 8px
);
border: solid 1px var(--sidebar-border-color);
border-left: none;
border-right: solid 1px var(--sidebar-resizer-shadow);
border-bottom: solid 1px var(--sidebar-resizer-shadow);
width: 8px;
height: 24px;
filter: var(--sidebar-resizer-img-filter);
}
.sidebar-resizer:hover::after {
filter: var(--sidebar-resizer-img-hover-filter);
image-rendering: crisp-edges;
}
.rustdoc.src .sidebar-resizer {
@ -614,8 +622,6 @@ img {
}
.sidebar-resizer.active::before {
border-left: solid 2px var(--sidebar-resizer-active);
margin-left: 8px;
padding-left: 1px;
display: block;
height: 100%;
content: "";
@ -3017,8 +3023,7 @@ by default.
--scrape-example-code-wrapper-background-end: rgba(255, 255, 255, 0);
--sidebar-resizer-hover: hsl(207, 90%, 66%);
--sidebar-resizer-active: hsl(207, 90%, 54%);
--sidebar-resizer-img-filter: opacity(66%);
--sidebar-resizer-img-hover-filter: none;
--sidebar-resizer-shadow: #ccc;
}
/* End theme: light */
@ -3032,7 +3037,7 @@ by default.
--settings-button-border-focus: #ffb900;
--sidebar-background-color: #505050;
--sidebar-background-color-hover: #676767;
--sidebar-border-color: #2A2A2A;
--sidebar-border-color: #999;
--code-block-background-color: #2A2A2A;
--scrollbar-track-background-color: #717171;
--scrollbar-thumb-background-color: rgba(32, 34, 37, .6);
@ -3128,8 +3133,7 @@ by default.
--scrape-example-code-wrapper-background-end: rgba(53, 53, 53, 0);
--sidebar-resizer-hover: hsl(207, 30%, 54%);
--sidebar-resizer-active: hsl(207, 90%, 54%);
--sidebar-resizer-img-filter: opacity(66%);
--sidebar-resizer-img-hover-filter: none;
--sidebar-resizer-shadow: #000;
}
/* End theme: dark */
@ -3147,7 +3151,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--settings-button-border-focus: #e0e0e0;
--sidebar-background-color: #14191f;
--sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
--sidebar-border-color: #000;
--sidebar-border-color: #5c6773;
--code-block-background-color: #191f26;
--scrollbar-track-background-color: transparent;
--scrollbar-thumb-background-color: #5c6773;
@ -3243,8 +3247,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--scrape-example-code-wrapper-background-end: rgba(15, 20, 25, 0);
--sidebar-resizer-hover: hsl(34, 50%, 33%);
--sidebar-resizer-active: hsl(34, 100%, 66%);
--sidebar-resizer-img-filter: opacity(66%);
--sidebar-resizer-img-hover-filter: none;
--sidebar-resizer-shadow: #000;
}
:root[data-theme="ayu"] h1,