OLD | NEW |
1 /** | 1 /** |
2 * Copyright 2017 Google Inc. All rights reserved. | 2 * Copyright 2017 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Licensed under the Apache License, Version 2.0 (the "License"); | 4 * Licensed under the Apache License, Version 2.0 (the "License"); |
5 * you may not use this file except in compliance with the License. | 5 * you may not use this file except in compliance with the License. |
6 * You may obtain a copy of the License at | 6 * You may obtain a copy of the License at |
7 * | 7 * |
8 * http://www.apache.org/licenses/LICENSE-2.0 | 8 * http://www.apache.org/licenses/LICENSE-2.0 |
9 * | 9 * |
10 * Unless required by applicable law or agreed to in writing, software | 10 * Unless required by applicable law or agreed to in writing, software |
11 * distributed under the License is distributed on an "AS IS" BASIS, | 11 * distributed under the License is distributed on an "AS IS" BASIS, |
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 * See the License for the specific language governing permissions and | 13 * See the License for the specific language governing permissions and |
14 * limitations under the License. | 14 * limitations under the License. |
15 */ | 15 */ |
16 | 16 |
17 :root { | 17 .lh-root { |
18 --text-font-family: '.SFNSDisplay-Regular', 'Helvetica Neue', 'Lucida Grande',
sans-serif; | 18 --text-font-family: '.SFNSDisplay-Regular', 'Helvetica Neue', 'Lucida Grande',
sans-serif; |
19 --body-font-size: 13px; | 19 --body-font-size: 13px; |
| 20 --header-font-size: 16px; |
| 21 --body-line-height: 1.5; |
20 --default-padding: 16px; | 22 --default-padding: 16px; |
21 | 23 |
22 --secondary-text-color: #565656; | 24 --secondary-text-color: #565656; |
23 /*--accent-color: #3879d9;*/ | 25 /*--accent-color: #3879d9;*/ |
24 --fail-color: #df332f; | 26 --fail-color: #df332f; |
25 --pass-color: #2b882f; | 27 --pass-color: #2b882f; |
26 --average-color: #ef6c00; /* md orange 800 */ | 28 --average-color: #ef6c00; /* md orange 800 */ |
27 --warning-color: #757575; /* md grey 600 */ | 29 --warning-color: #757575; /* md grey 600 */ |
28 | 30 |
29 --report-border-color: #ebebeb; | 31 --report-border-color: #ccc; |
| 32 --report-secondary-border-color: #ebebeb; |
| 33 --report-width: 850px; |
| 34 --report-menu-width: 280px; |
| 35 --report-content-width: calc(var(--report-width) + var(--report-menu-width)); |
30 | 36 |
31 --lh-score-highlight-bg: #fafafa; | 37 --lh-score-highlight-bg: #fafafa; |
32 --lh-score-icon-background-size: 17px; | 38 --lh-score-icon-background-size: 17px; |
33 --lh-score-margin: var(--default-padding); | 39 --lh-score-margin: var(--default-padding); |
34 --lh-audit-score-width: 35px; | 40 --lh-audit-score-width: 35px; |
35 --lh-category-score-width: 50px; | 41 --lh-category-score-width: 50px; |
36 } | 42 } |
37 | 43 |
38 * { | 44 .lh-root * { |
39 box-sizing: border-box; | 45 box-sizing: border-box; |
40 } | 46 } |
41 | 47 |
42 body { | 48 .lh-root { |
43 font-family: var(--text-font-family); | 49 font-family: var(--text-font-family); |
44 font-size: var(--body-font-size); | 50 font-size: var(--body-font-size); |
45 margin: 0; | 51 margin: 0; |
46 line-height: var(--body-line-height); | 52 line-height: var(--body-line-height); |
| 53 background: #f5f5f5; |
| 54 scroll-behavior: smooth; |
47 } | 55 } |
48 | 56 |
49 [hidden] { | 57 .lh-root [hidden] { |
50 display: none !important; | 58 display: none !important; |
51 } | 59 } |
52 | 60 |
| 61 a { |
| 62 color: #0c50c7; |
| 63 } |
| 64 |
| 65 summary { |
| 66 cursor: pointer; |
| 67 } |
| 68 |
53 .lh-details { | 69 .lh-details { |
54 font-size: smaller; | 70 font-size: smaller; |
55 margin-top: var(--default-padding); | 71 margin-top: var(--default-padding); |
56 } | 72 } |
57 | 73 |
58 .lh-details summary { | |
59 cursor: pointer; | |
60 } | |
61 | |
62 .lh-details[open] summary { | 74 .lh-details[open] summary { |
63 margin-bottom: var(--default-padding); | 75 margin-bottom: var(--default-padding); |
64 } | 76 } |
65 | 77 |
| 78 /* Report header */ |
| 79 |
| 80 .report-icon { |
| 81 opacity: 0.7; |
| 82 } |
| 83 .report-icon:hover { |
| 84 opacity: 1; |
| 85 } |
| 86 .report-icon[disabled] { |
| 87 opacity: 0.3; |
| 88 pointer-events: none; |
| 89 } |
| 90 |
| 91 .report-icon--share { |
| 92 background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2
000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24
v24H0z"/><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7
s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3
1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34
3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2
.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/></svg>'); |
| 93 } |
| 94 .report-icon--print { |
| 95 background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2
000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 8H5c-1.66 0-3 1
.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1
s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/><path fill="none" d="M0 0h24v24
H0z"/></svg>'); |
| 96 } |
| 97 .report-icon--copy { |
| 98 background-image: url('data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 2
4 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill
="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c
0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>'); |
| 99 } |
| 100 .report-icon--open { |
| 101 background-image: url('data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 2
4 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill
="none"/><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2
h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"/></svg>'); |
| 102 } |
| 103 .report-icon--download { |
| 104 background-image: url('data:image/svg+xml;utf8,<svg height="24" viewBox="0 0 2
4 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19 9h-4V3H9v6H5l7
7 7-7zM5 18v2h14v-2H5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'); |
| 105 } |
| 106 |
66 /* List */ | 107 /* List */ |
| 108 .lh-list { |
| 109 font-size: smaller; |
| 110 margin-top: var(--default-padding); |
| 111 } |
| 112 |
67 .lh-list__items { | 113 .lh-list__items { |
68 padding-left: var(--default-padding); | 114 padding-left: var(--default-padding); |
69 } | 115 } |
70 | 116 |
71 .lh-list__items > * { | 117 .lh-list__items > * { |
72 border-bottom: 1px solid gray; | 118 border-bottom: 1px solid gray; |
73 margin-bottom: 2px; | 119 margin-bottom: 2px; |
74 } | 120 } |
75 | 121 |
76 /* Card */ | 122 /* Card */ |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 position: absolute; | 182 position: absolute; |
137 left: 0; | 183 left: 0; |
138 right: 0; | 184 right: 0; |
139 top: 0; | 185 top: 0; |
140 bottom: 0; | 186 bottom: 0; |
141 background-color: #000; | 187 background-color: #000; |
142 border-radius: inherit; | 188 border-radius: inherit; |
143 } | 189 } |
144 | 190 |
145 .lh-score__value--binary { | 191 .lh-score__value--binary { |
146 text-indent: -500px; | 192 text-indent: -5000px; |
147 } | 193 } |
148 | 194 |
149 /* No icon for audits with number scores. */ | 195 /* No icon for audits with number scores. */ |
150 .lh-score__value:not(.lh-score__value--binary)::after { | 196 .lh-score__value:not(.lh-score__value--binary)::after { |
151 content: none; | 197 content: none; |
152 } | 198 } |
153 | 199 |
154 .lh-score__value--pass { | 200 .lh-score__value--pass { |
155 background: var(--pass-color); | 201 background: var(--pass-color); |
156 } | 202 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 font-size: smaller; | 239 font-size: smaller; |
194 color: var(--secondary-text-color); | 240 color: var(--secondary-text-color); |
195 margin-top: calc(var(--default-padding) / 2); | 241 margin-top: calc(var(--default-padding) / 2); |
196 } | 242 } |
197 | 243 |
198 .lh-score__header { | 244 .lh-score__header { |
199 flex: 1; | 245 flex: 1; |
200 margin-top: 2px; | 246 margin-top: 2px; |
201 } | 247 } |
202 | 248 |
203 .lh-score__header[open] .lh-score__arrow { | 249 .lh-score__header[open] .lh-toggle-arrow { |
204 transform: rotateZ(90deg); | 250 transform: rotateZ(90deg); |
205 } | 251 } |
206 | 252 |
207 .lh-score__arrow { | 253 .lh-toggle-arrow { |
208 background: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox
="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l
4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></
svg>') no-repeat 50% 50%; | 254 background: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox
="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M8.59 16.34l
4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/><path d="M0-.25h24v24H0z" fill="none"/></
svg>') no-repeat 50% 50%; |
209 background-size: contain; | 255 background-size: contain; |
210 background-color: transparent; | 256 background-color: transparent; |
211 width: 24px; | 257 width: 24px; |
212 height: 24px; | 258 height: 24px; |
213 flex: none; | 259 flex: none; |
214 margin: 0 8px 0 8px; | 260 margin-left: calc(var(--default-padding) / 2); |
215 transition: transform 150ms ease-in-out; | 261 transition: transform 150ms ease-in-out; |
| 262 cursor: pointer; |
| 263 border: none; |
216 } | 264 } |
217 | 265 |
218 .lh-score__snippet { | 266 .lh-score__snippet { |
219 display: flex; | 267 display: flex; |
220 align-items: center; | 268 align-items: center; |
221 justify-content: space-between; | 269 justify-content: space-between; |
222 cursor: pointer; | |
223 /*outline: none;*/ | 270 /*outline: none;*/ |
224 } | 271 } |
225 | 272 |
226 .lh-score__snippet::-moz-list-bullet { | 273 .lh-score__snippet::-moz-list-bullet { |
227 display: none; | 274 display: none; |
228 } | 275 } |
229 | 276 |
230 .lh-score__snippet::-webkit-details-marker { | 277 .lh-score__snippet::-webkit-details-marker { |
231 display: none; | 278 display: none; |
232 } | 279 } |
233 | 280 |
234 /*.lh-score__snippet:focus .lh-score__title { | 281 /*.lh-score__snippet:focus .lh-score__title { |
235 outline: rgb(59, 153, 252) auto 5px; | 282 outline: rgb(59, 153, 252) auto 5px; |
236 }*/ | 283 }*/ |
237 | 284 |
238 /* Audit */ | 285 /* Audit */ |
239 | 286 |
240 .lh-audit { | 287 .lh-audit { |
241 margin-top: var(--default-padding); | 288 margin-top: var(--default-padding); |
242 } | 289 } |
243 | 290 |
244 .lh-audit > .lh-score { | 291 .lh-audit > .lh-score { |
245 font-size: 16px; | 292 font-size: 16px; |
| 293 font-size: var(--header-font-size); |
| 294 } |
| 295 |
| 296 .lh-debug { |
| 297 margin-top: calc(var(--default-padding) / 2); |
| 298 margin-left: calc(var(--lh-audit-score-width) + var(--lh-score-margin)); |
| 299 color: var(--fail-color); |
246 } | 300 } |
247 | 301 |
248 /* Report */ | 302 /* Report */ |
249 | 303 |
| 304 .lh-container { |
| 305 display: flex; |
| 306 max-width: var(--report-content-width); |
| 307 margin: 0 auto; |
| 308 /*border-right: 1px solid var(--report-border-color);*/ |
| 309 /*border-left: 1px solid var(--report-border-color);*/ |
| 310 } |
| 311 |
| 312 .lh-report { |
| 313 margin-left: var(--report-menu-width); |
| 314 background-color: #fff; |
| 315 } |
| 316 |
250 .lh-exception { | 317 .lh-exception { |
251 font-size: large; | 318 font-size: large; |
252 } | 319 } |
253 | 320 |
254 .lh-report { | 321 .lh-scores-header { |
255 padding: var(--default-padding); | 322 display: flex; |
| 323 margin: var(--report-header-height) 0 0 0; |
| 324 padding: calc(var(--default-padding) * 2) var(--default-padding); |
| 325 border-bottom: 1px solid var(--report-border-color); |
256 } | 326 } |
257 | 327 |
258 .lh-category { | 328 .lh-category { |
259 padding: 24px 0; | 329 padding: 24px calc(var(--default-padding) * 2); |
260 border-top: 1px solid var(--report-border-color); | 330 border-top: 1px solid var(--report-border-color); |
261 } | 331 } |
262 | 332 |
263 .lh-category:first-of-type { | 333 .lh-category:first-of-type { |
264 border: none; | 334 border: none; |
265 padding-top: 0; | |
266 } | 335 } |
267 | 336 |
268 .lh-category > .lh-audit, | 337 .lh-category > .lh-audit, |
269 .lh-category > .lh-passed-audits > .lh-audit { | 338 .lh-category > .lh-passed-audits > .lh-audit { |
270 margin-left: calc(var(--lh-category-score-width) + var(--lh-score-margin)); | 339 margin-left: calc(var(--lh-category-score-width) + var(--lh-score-margin)); |
271 } | 340 } |
272 | 341 |
273 .lh-category > .lh-score { | 342 .lh-category > .lh-score { |
274 font-size: 20px; | 343 font-size: 20px; |
275 } | 344 } |
276 | 345 |
277 .lh-category > .lh-score .lh-score__value { | 346 .lh-category > .lh-score .lh-score__value { |
278 width: var(--lh-category-score-width); | 347 width: var(--lh-category-score-width); |
279 } | 348 } |
280 | 349 |
281 /* Category snippet shouldnt have pointer cursor. */ | 350 /* Category snippet shouldnt have pointer cursor. */ |
282 .lh-category > .lh-score .lh-score__snippet { | 351 .lh-category > .lh-score .lh-score__snippet { |
283 cursor: initial; | 352 cursor: initial; |
284 } | 353 } |
285 | 354 |
286 .lh-category > .lh-score .lh-score__title { | 355 .lh-category > .lh-score .lh-score__title { |
287 font-size: 24px; | 356 font-size: 24px; |
288 font-weight: 400; | 357 font-weight: 400; |
289 } | 358 } |
290 | 359 |
291 summary.lh-passed-audits-summary { | 360 summary.lh-passed-audits-summary { |
292 margin: 10px 5px; | 361 margin: var(--default-padding); |
293 font-size: 15px; | 362 font-size: 15px; |
| 363 display: flex; |
| 364 align-items: center; |
294 } | 365 } |
295 | 366 |
296 summary.lh-passed-audits-summary::-webkit-details-marker { | 367 summary.lh-passed-audits-summary::-webkit-details-marker { |
297 background: rgb(66, 175, 69); | 368 background: var(--pass-color); |
298 color: white; | 369 color: white; |
299 position:relative; | 370 position: relative; |
300 content: ''; | 371 content: ''; |
301 padding: 3px; | 372 padding: 3px 3px 3px 6px; |
| 373 border-radius: 2px; |
| 374 } |
| 375 |
| 376 .lh-passed-audits[open] summary.lh-passed-audits-summary::-webkit-details-marker
{ |
| 377 padding: 3px 5px 3px 4px; |
| 378 } |
| 379 |
| 380 #lh-log { |
| 381 position: fixed; |
| 382 background-color: #323232; |
| 383 color: #fff; |
| 384 min-height: 48px; |
| 385 min-width: 288px; |
| 386 padding: 16px 24px; |
| 387 box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); |
| 388 border-radius: 2px; |
| 389 margin: 12px; |
| 390 font-size: 14px; |
| 391 cursor: default; |
| 392 transition: transform 0.3s, opacity 0.3s; |
| 393 transform: translateY(100px); |
| 394 opacity: 0; |
| 395 -webkit-font-smoothing: antialiased; |
| 396 bottom: 0; |
| 397 left: 0; |
| 398 z-index: 3; |
| 399 } |
| 400 |
| 401 #lh-log.show { |
| 402 opacity: 1; |
| 403 transform: translateY(0); |
| 404 } |
| 405 |
| 406 @media screen and (max-width: 767px) { |
| 407 .lh-report { |
| 408 margin-left: 0; |
| 409 } |
| 410 .lh-category { |
| 411 padding: 24px var(--default-padding); |
| 412 } |
| 413 } |
| 414 |
| 415 @media print { |
| 416 body { |
| 417 -webkit-print-color-adjust: exact; /* print background colors */ |
| 418 } |
| 419 .lh-report { |
| 420 margin-left: 0; |
| 421 } |
| 422 .lh-categories { |
| 423 margin-top: 0; |
| 424 } |
302 } | 425 } |
303 | 426 |
304 /*# sourceURL=report.styles.css */ | 427 /*# sourceURL=report.styles.css */ |
OLD | NEW |