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