]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/static/css/themes/light.css
Auto merge of #101603 - matthiaskrgr:rollup-8y6kf20, r=matthiaskrgr
[rust.git] / src / librustdoc / html / static / css / themes / light.css
1 :root {
2         --main-background-color: white;
3         --main-color: black;
4         --settings-input-color: #2196f3;
5         --sidebar-background-color: #F5F5F5;
6         --sidebar-background-color-hover: #E0E0E0;
7         --code-block-background-color: #F5F5F5;
8         --scrollbar-track-background-color: #dcdcdc;
9         --scrollbar-thumb-background-color: rgba(36, 37, 39, 0.6);
10         --scrollbar-color: rgba(36, 37, 39, 0.6) #d9d9d9;
11         --headings-border-bottom-color: #ddd;
12         --border-color: #e0e0e0;
13         --button-background-color: #fff;
14         --right-side-color: grey;
15         --code-attribute-color: #999;
16         --toggles-color: #999;
17         --search-input-focused-border-color: #66afe9;
18         --copy-path-button-color: #999;
19         --copy-path-img-filter: invert(50%);
20         --copy-path-img-hover-filter: invert(35%);
21         --codeblock-error-hover-color: rgb(255, 0, 0);
22         --codeblock-error-color: rgba(255, 0, 0, .5);
23         --codeblock-ignore-hover-color: rgb(255, 142, 0);
24         --codeblock-ignore-color: rgba(255, 142, 0, .6);
25 }
26
27 .slider {
28         background-color: #ccc;
29 }
30 .slider:before {
31         background-color: white;
32 }
33 input:focus + .slider {
34         box-shadow: 0 0 0 2px #0a84ff, 0 0 0 6px rgba(10, 132, 255, 0.3);
35 }
36
37 .rust-logo {
38         /* This rule exists to force other themes to explicitly style the logo.
39          * Rustdoc has a custom linter for this purpose.
40          */
41 }
42
43 .sidebar .current,
44 .sidebar a:hover {
45         background-color: #fff;
46 }
47
48 .line-numbers span { color: #c67e2d; }
49 .line-numbers .line-highlighted {
50         background-color: #FDFFD3 !important;
51 }
52
53 .search-results a:hover {
54         background-color: #ddd;
55 }
56
57 .search-results a:focus {
58         color: #000 !important;
59         background-color: #ccc;
60 }
61 .search-results a:focus span { color: #000 !important; }
62 a.result-trait:focus { background-color: #c7b6ff; }
63 a.result-traitalias:focus { background-color: #c7b6ff; }
64 a.result-mod:focus,
65 a.result-externcrate:focus { background-color: #afc6e4; }
66 a.result-enum:focus { background-color: #e7b1a0; }
67 a.result-struct:focus { background-color: #e7b1a0; }
68 a.result-union:focus { background-color: #e7b1a0; }
69 a.result-fn:focus,
70 a.result-method:focus,
71 a.result-tymethod:focus { background-color: #c6afb3; }
72 a.result-type:focus { background-color: #e7b1a0; }
73 a.result-associatedtype:focus { background-color: #afc6e4; }
74 a.result-foreigntype:focus { background-color: #e7b1a0; }
75 a.result-attr:focus,
76 a.result-derive:focus,
77 a.result-macro:focus { background-color: #8ce488; }
78 a.result-constant:focus,
79 a.result-static:focus { background-color: #afc6e4; }
80 a.result-primitive:focus { background-color: #e7b1a0; }
81 a.result-keyword:focus { background-color: #afc6e4; }
82
83 .content .item-info::before { color: #ccc; }
84
85 .content span.enum, .content a.enum, .block a.current.enum { color: #AD378A; }
86 .content span.struct, .content a.struct, .block a.current.struct { color: #AD378A; }
87 .content span.type, .content a.type, .block a.current.type { color:  #AD378A; }
88 .content span.foreigntype, .content a.foreigntype, .block a.current.foreigntype { color: #3873AD; }
89 .content span.associatedtype,
90 .content a.associatedtype,
91 .block a.current.associatedtype { color: #3873AD; }
92 .content span.attr, .content a.attr, .block a.current.attr,
93 .content span.derive, .content a.derive, .block a.current.derive,
94 .content span.macro, .content a.macro, .block a.current.macro { color: #068000; }
95 .content span.union, .content a.union, .block a.current.union { color: #AD378A; }
96 .content span.constant, .content a.constant, .block a.current.constant,
97 .content span.static, .content a.static, .block a.current.static { color: #3873AD; }
98 .content span.primitive, .content a.primitive, .block a.current.primitive { color: #AD378A; }
99 .content span.externcrate,
100 .content span.mod, .content a.mod, .block a.current.mod { color: #3873AD; }
101 .content span.trait, .content a.trait, .block a.current.trait { color: #6E4FC9; }
102 .content span.traitalias, .content a.traitalias, .block a.current.traitalias { color: #5137AD; }
103 .content span.fn, .content a.fn, .block a.current.fn,
104 .content span.method, .content a.method, .block a.current.method,
105 .content span.tymethod, .content a.tymethod, .block a.current.tymethod,
106 .content .fnname { color: #AD7C37; }
107 .content span.keyword, .content a.keyword, .block a.current.keyword { color: #3873AD; }
108
109 .sidebar a { color: #356da4; }
110 .sidebar a.current.enum { color: #a63283; }
111 .sidebar a.current.struct { color: #a63283; }
112 .sidebar a.current.type { color: #a63283; }
113 .sidebar a.current.associatedtype { color: #356da4; }
114 .sidebar a.current.foreigntype { color: #356da4; }
115 .sidebar a.current.attr,
116 .sidebar a.current.derive,
117 .sidebar a.current.macro { color: #067901; }
118 .sidebar a.current.union { color: #a63283; }
119 .sidebar a.current.constant
120 .sidebar a.current.static { color: #356da4; }
121 .sidebar a.current.primitive { color: #a63283; }
122 .sidebar a.current.externcrate
123 .sidebar a.current.mod { color: #356da4; }
124 .sidebar a.current.trait { color: #6849c3; }
125 .sidebar a.current.traitalias { color: #4b349e; }
126 .sidebar a.current.fn,
127 .sidebar a.current.method,
128 .sidebar a.current.tymethod { color: #a67736; }
129 .sidebar a.current.keyword { color: #356da4; }
130
131 a {
132         color: #3873AD;
133 }
134
135 body.source .example-wrap pre.rust a {
136         background: #eee;
137 }
138
139 #crate-search-div::after {
140         /* match border-color; uses https://codepen.io/sosuke/pen/Pjoqqp */
141         filter: invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);
142 }
143 #crate-search:hover, #crate-search:focus {
144         border-color: #717171 !important;
145 }
146 #crate-search-div:hover::after, #crate-search-div:focus-within::after {
147         filter: invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);
148 }
149
150 .stab { background: #FFF5D6; border-color: #FFC600; }
151 .stab.portability > code { background: none; }
152
153 .line-numbers :target { background-color: transparent; }
154
155 /* Code highlighting */
156 pre.rust .kw { color: #8959A8; }
157 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
158 pre.rust .number, pre.rust .string { color: #718C00; }
159 pre.rust .self, pre.rust .bool-val, pre.rust .prelude-val,
160 pre.rust .attribute { color: #C82829; }
161 pre.rust .comment { color: #8E908C; }
162 pre.rust .doccomment { color: #4D4D4C; }
163 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
164 pre.rust .lifetime { color: #B76514; }
165 pre.rust .question-mark {
166         color: #ff9011;
167 }
168
169 .example-wrap > pre.line-number {
170         border-color: #c7c7c7;
171 }
172
173 a.test-arrow {
174         color: #f5f5f5;
175         background-color: rgba(78, 139, 202, 0.2);
176 }
177
178 a.test-arrow:hover{
179         background-color: #4e8bca;
180 }
181
182 :target {
183         background: #FDFFD3;
184         border-right: 3px solid #AD7C37;
185 }
186
187 .search-failed a {
188         color: #3873AD;
189 }
190
191 .tooltip::after {
192         background-color: #000;
193         color: #fff;
194 }
195
196 .tooltip::before {
197         border-color: transparent black transparent transparent;
198 }
199
200 .notable-traits-tooltiptext {
201         background-color: #eee;
202 }
203
204 #titles > button:not(.selected) {
205         background-color: #e6e6e6;
206         border-top-color: #e6e6e6;
207 }
208
209 #titles > button:hover, #titles > button.selected {
210         background-color: #ffffff;
211         border-top-color: #0089ff;
212 }
213
214 #titles > button > div.count {
215         color: #888;
216 }
217
218 kbd {
219         color: #000;
220         background-color: #fafbfc;
221         box-shadow: inset 0 -1px 0 #c6cbd1;
222 }
223
224 #settings-menu > a:hover, #settings-menu > a:focus,
225 #help-button > button:hover, #help-button > button:focus {
226         border-color: #717171;
227 }
228
229 .search-results .result-name span.alias {
230         color: #000;
231 }
232 .search-results .result-name span.grey {
233         color: #999;
234 }
235
236 #source-sidebar div.files > a:hover, details.dir-entry summary:hover,
237 #source-sidebar div.files > a:focus, details.dir-entry summary:focus {
238         background-color: #E0E0E0;
239 }
240 #source-sidebar div.files > a.selected {
241         background-color: #fff;
242 }
243 .scraped-example-list .scrape-help {
244         border-color: #555;
245         color: #333;
246 }
247 .scraped-example-list .scrape-help:hover {
248         border-color: black;
249         color: black;
250 }
251 .scraped-example .example-wrap .rust span.highlight {
252         background: #fcffd6;
253 }
254 .scraped-example .example-wrap .rust span.highlight.focus {
255         background: #f6fdb0;
256 }
257 .scraped-example:not(.expanded) .code-wrapper:before {
258         background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
259 }
260 .scraped-example:not(.expanded) .code-wrapper:after {
261         background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
262 }
263 .toggle-line-inner {
264         background: #ccc;
265 }
266 .toggle-line:hover .toggle-line-inner {
267         background: #999;
268 }