]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/css/themes/ayu.css
Rollup merge of #105724 - notriddle:notriddle/scrape-example-src-line-numbers, r...
[rust.git] / src / librustdoc / html / static / css / themes / ayu.css
1 /*
2 Based off of the Ayu theme
3 Original by Dempfi (https://github.com/dempfi/ayu)
4 */
5
6 :root {
7         --main-background-color: #0f1419;
8         --main-color: #c5c5c5;
9         --settings-input-color: #ffb454;
10         --settings-button-color: #fff;
11         --settings-button-border-focus: #e0e0e0;
12         --sidebar-background-color: #14191f;
13         --sidebar-background-color-hover: rgba(70, 70, 70, 0.33);
14         --code-block-background-color: #191f26;
15         --scrollbar-track-background-color: transparent;
16         --scrollbar-thumb-background-color: #5c6773;
17         --scrollbar-color: #5c6773 #24292f;
18         --headings-border-bottom-color: #5c6773;
19         --border-color: #5c6773;
20         --button-background-color: #141920;
21         --right-side-color: grey;
22         --code-attribute-color: #999;
23         --toggles-color: #999;
24         --toggle-filter: invert(100%);
25         --search-input-focused-border-color: #5c6773; /* Same as `--border-color`. */
26         --copy-path-button-color: #fff;
27         --copy-path-img-filter: invert(70%);
28         --copy-path-img-hover-filter: invert(100%);
29         --codeblock-error-hover-color: rgb(255, 0, 0);
30         --codeblock-error-color: rgba(255, 0, 0, .5);
31         --codeblock-ignore-hover-color: rgb(255, 142, 0);
32         --codeblock-ignore-color: rgba(255, 142, 0, .6);
33         --type-link-color: #ffa0a5;
34         --trait-link-color: #39afd7;
35         --assoc-item-link-color: #39afd7;
36         --function-link-color: #fdd687;
37         --macro-link-color: #a37acc;
38         --keyword-link-color: #39afd7;
39         --mod-link-color: #39afd7;
40         --link-color: #39afd7;
41         --sidebar-link-color: #53b1db;
42         --sidebar-current-link-background-color: transparent;
43         --search-result-link-focus-background-color: #3c3c3c;
44         --search-result-border-color: #aaa3;
45         --search-color: #fff;
46         --search-results-alias-color: #c5c5c5;
47         --search-results-grey-color: #999;
48         --stab-background-color: #314559;
49         --stab-code-color: #e6e1cf;
50         --code-highlight-kw-color: #ff7733;
51         --code-highlight-kw-2-color: #ff7733;
52         --code-highlight-lifetime-color: #ff7733;
53         --code-highlight-prelude-color: #69f2df;
54         --code-highlight-prelude-val-color: #ff7733;
55         --code-highlight-number-color: #b8cc52;
56         --code-highlight-string-color: #b8cc52;
57         --code-highlight-literal-color: #ff7733;
58         --code-highlight-attribute-color: #e6e1cf;
59         --code-highlight-self-color: #36a3d9;
60         --code-highlight-macro-color: #a37acc;
61         --code-highlight-question-mark-color: #ff9011;
62         --code-highlight-comment-color: #788797;
63         --code-highlight-doc-comment-color: #a1ac88;
64         --example-line-numbers-border-color: none;
65         --src-line-numbers-span-color: #5c6773;
66         --src-line-number-highlighted-background-color: rgba(255, 236, 164, 0.06);
67         --test-arrow-color: #788797;
68         --test-arrow-background-color: rgba(57, 175, 215, 0.09);
69         --test-arrow-hover-color: #c5c5c5;
70         --test-arrow-hover-background-color: rgba(57, 175, 215, 0.368);
71         --target-background-color: rgba(255, 236, 164, 0.06);
72         --target-border-color: rgba(255, 180, 76, 0.85);
73         --tooltip-background-color: #314559;
74         --tooltip-color: #c5c5c5;
75         --kbd-color: #c5c5c5;
76         --kbd-background: #314559;
77         --kbd-box-shadow-color: #5c6773;
78         --rust-logo-filter: drop-shadow(1px 0 0px #fff)
79                 drop-shadow(0 1px 0 #fff)
80                 drop-shadow(-1px 0 0 #fff)
81                 drop-shadow(0 -1px 0 #fff);
82         /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
83         --crate-search-div-filter: invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg)
84                 brightness(94%) contrast(94%);
85         --crate-search-div-hover-filter: invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg)
86                 brightness(113%) contrast(76%);
87         --crate-search-hover-border: #e0e0e0;
88         --source-sidebar-background-selected: #14191f;
89         --source-sidebar-background-hover: #14191f;
90         --table-alt-row-background-color: #191f26;
91 }
92
93 h1, h2, h3, h4 {
94         color: white;
95 }
96 h1 a {
97         color: #fff;
98 }
99 h4 {
100         border: none;
101 }
102
103 .docblock code {
104         color: #ffb454;
105 }
106 .code-header {
107         color: #e6e1cf;
108 }
109 .docblock pre > code, pre > code {
110         color: #e6e1cf;
111 }
112 .item-info code {
113         color: #e6e1cf;
114 }
115 .docblock a > code {
116         color: #39AFD7 !important;
117 }
118 pre, .rustdoc.source .example-wrap {
119         color: #e6e1cf;
120 }
121
122 .sidebar .current,
123 .sidebar a:hover {
124         color: #ffb44c;
125 }
126
127 .sidebar-elems .location {
128         color: #ff7733;
129 }
130
131 .src-line-numbers .line-highlighted {
132         color: #708090;
133         padding-right: 4px;
134         border-right: 1px solid #ffb44c;
135 }
136
137 .search-results a:hover {
138         color: #fff !important;
139         background-color: #3c3c3c;
140 }
141
142 .search-results a:focus {
143         color: #fff !important;
144         background-color: #3c3c3c;
145 }
146 .search-results a {
147         color: #0096cf;
148 }
149 .search-results a div.desc {
150         color: #c5c5c5;
151 }
152
153 .content .item-info::before { color: #ccc; }
154
155 .sidebar h2 a,
156 .sidebar h3 a {
157         color: white;
158 }
159 body.source .example-wrap pre.rust a {
160         background: #333;
161 }
162
163 .result-name .primitive > i, .result-name .keyword > i {
164         color: #788797;
165 }
166
167 #titles > button.selected {
168         background-color: #141920 !important;
169         border-bottom: 1px solid #ffb44c !important;
170         border-top: none;
171 }
172
173 #titles > button:not(.selected) {
174         background-color: transparent !important;
175         border: none;
176 }
177
178 #titles > button:hover {
179         border-bottom: 1px solid rgba(242, 151, 24, 0.3);
180 }
181
182 #titles > button > div.count {
183         color: #888;
184 }
185
186 /* rules that this theme does not need to set, here to satisfy the rule checker */
187 /* note that a lot of these are partially set in some way (meaning they are set
188 individually rather than as a group) */
189 /* FIXME: these rules should be at the bottom of the file but currently must be
190 above the `@media (max-width: 700px)` rules due to a bug in the css checker */
191 /* see https://github.com/rust-lang/rust/pull/71237#issuecomment-618170143 */
192 pre.rust .lifetime {}
193 pre.rust .kw {}
194 #titles > button:hover, #titles > button.selected {}
195 pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val, pre.rust .attribute {}
196 pre.rust .kw-2, pre.rust .prelude-ty {}
197
198 #settings-menu > a img {
199         filter: invert(100);
200 }
201
202 #source-sidebar > .title {
203         color: #fff;
204 }
205 #source-sidebar div.files > a:hover, details.dir-entry summary:hover,
206 #source-sidebar div.files > a:focus, details.dir-entry summary:focus,
207 #source-sidebar div.files > a.selected {
208         color: #ffb44c;
209 }
210
211 .scraped-example-list .scrape-help {
212         border-color: #aaa;
213         color: #eee;
214 }
215 .scraped-example-list .scrape-help:hover {
216         border-color: white;
217         color: white;
218 }
219 .scraped-example .example-wrap .rust span.highlight {
220         background: rgb(91, 59, 1);
221 }
222 .scraped-example .example-wrap .rust span.highlight.focus {
223         background: rgb(124, 75, 15);
224 }
225 .scraped-example:not(.expanded) .code-wrapper:before {
226         background: linear-gradient(to bottom, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
227 }
228 .scraped-example:not(.expanded) .code-wrapper:after {
229         background: linear-gradient(to top, rgba(15, 20, 25, 1), rgba(15, 20, 25, 0));
230 }
231 .toggle-line-inner {
232         background: #999;
233 }
234 .toggle-line:hover .toggle-line-inner {
235         background: #c5c5c5;
236 }