Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/audits2/lighthouse/report-styles.css

Issue 2863533002: DevTools: Roll lighthouse w/ artifact delivery (Closed)
Patch Set: extra roll of css tweaks Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 .lh-root { 17 .lh-vars {
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; 20 --header-font-size: 16px;
21 --body-line-height: 1.5; 21 --body-line-height: 1.5;
22 --default-padding: 16px; 22 --default-padding: 16px;
23 23
24 --secondary-text-color: #565656; 24 --secondary-text-color: #565656;
25 /*--accent-color: #3879d9;*/ 25 /*--accent-color: #3879d9;*/
26 --fail-color: #df332f; 26 --fail-color: #df332f;
27 --pass-color: #2b882f; 27 --pass-color: #2b882f;
28 --informative-color: #0c50c7;
28 --average-color: #ef6c00; /* md orange 800 */ 29 --average-color: #ef6c00; /* md orange 800 */
29 --warning-color: #757575; /* md grey 600 */ 30 --warning-color: #757575; /* md grey 600 */
30 31
31 --report-border-color: #ccc; 32 --report-border-color: #ccc;
32 --report-secondary-border-color: #ebebeb; 33 --report-secondary-border-color: #ebebeb;
33 --report-width: 850px; 34 --report-width: 850px;
34 --report-menu-width: 280px; 35 --report-menu-width: 280px;
35 --report-content-width: calc(var(--report-width) + var(--report-menu-width)); 36 --report-content-width: calc(var(--report-width) + var(--report-menu-width));
36 37
37 --lh-score-highlight-bg: #fafafa; 38 --lh-score-highlight-bg: #fafafa;
38 --lh-score-icon-background-size: 17px; 39 --lh-score-icon-background-size: 24px;
39 --lh-score-margin: var(--default-padding); 40 --lh-score-margin: calc(var(--default-padding) / 2);
40 --lh-audit-score-width: 35px; 41 --lh-audit-score-width: 35px;
41 --lh-category-score-width: 50px; 42 --lh-category-score-width: 60px;
42 } 43 }
43 44
44 .lh-root * { 45 .lh-root * {
45 box-sizing: border-box; 46 box-sizing: border-box;
46 } 47 }
47 48
48 .lh-root { 49 .lh-root {
49 font-family: var(--text-font-family); 50 font-family: var(--text-font-family);
50 font-size: var(--body-font-size); 51 font-size: var(--body-font-size);
51 margin: 0; 52 margin: 0;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 159
159 /* Score */ 160 /* Score */
160 161
161 .lh-score { 162 .lh-score {
162 display: flex; 163 display: flex;
163 align-items: flex-start; 164 align-items: flex-start;
164 } 165 }
165 166
166 .lh-score__value { 167 .lh-score__value {
167 flex: none; 168 flex: none;
168 padding: 5px;
169 margin-right: var(--lh-score-margin); 169 margin-right: var(--lh-score-margin);
170 width: var(--lh-audit-score-width); 170 width: var(--lh-audit-score-width);
171 display: flex; 171 display: flex;
172 justify-content: center; 172 justify-content: center;
173 align-items: center; 173 align-items: center;
174 background: var(--warning-color);
175 color: #fff;
176 border-radius: 2px; 174 border-radius: 2px;
177 position: relative; 175 position: relative;
176 font-weight: bold;
178 } 177 }
179 178
180 .lh-score__value::after { 179 .lh-score__value::after {
181 content: ''; 180 content: '';
182 position: absolute; 181 position: absolute;
183 left: 0; 182 left: 0;
184 right: 0; 183 right: 0;
185 top: 0; 184 top: 0;
186 bottom: 0; 185 bottom: 0;
187 background-color: #000;
188 border-radius: inherit; 186 border-radius: inherit;
189 } 187 }
190 188
189 .lh-score--informative .lh-score__value {
190 color: var(--informative-color);
191 border-radius: 50%;
192 }
193
194 .lh-score--informative .lh-score__value::after {
195 background: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox=" 0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>info</title><path d="M12 2C 6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8 h-2V7h2v2z" fill="#0c50c7"/></svg>') no-repeat 50% 50%;
196 background-size: var(--lh-score-icon-background-size);
197 }
198
191 .lh-score__value--binary { 199 .lh-score__value--binary {
192 text-indent: -5000px; 200 text-indent: -5000px;
193 } 201 }
194 202
195 /* No icon for audits with number scores. */ 203 /* No icon for audits with number scores. */
196 .lh-score__value:not(.lh-score__value--binary)::after { 204 .lh-score__value:not(.lh-score__value--binary)::after {
197 content: none; 205 content: none;
198 } 206 }
199 207
200 .lh-score__value--pass { 208 .lh-score__value--pass {
201 background: var(--pass-color); 209 color: var(--pass-color);
202 } 210 }
203 211
204 .lh-score__value--pass::after { 212 .lh-score__value--pass::after {
205 background: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox=" 0 0 12 12" xmlns="http://www.w3.org/2000/svg"><title>pass</title><path d="M9.17 2.33L4.5 7 2.83 5.33 1.5 6.66l3 3 6-6z" fill="white" fill-rule="evenodd"/></svg> ') no-repeat 50% 50%; 213 background: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox=" 0 0 12 12" xmlns="http://www.w3.org/2000/svg"><title>pass</title><path d="M9.17 2.33L4.5 7 2.83 5.33 1.5 6.66l3 3 6-6z" fill="#2b882f" fill-rule="evenodd"/></sv g>') no-repeat 50% 50%;
206 background-size: var(--lh-score-icon-background-size); 214 background-size: var(--lh-score-icon-background-size);
207 } 215 }
208 216
209 .lh-score__value--average { 217 .lh-score__value--average {
210 background: var(--average-color); 218 color: var(--average-color);
211 } 219 }
212 220
213 .lh-score__value--average::after { 221 .lh-score__value--average::after {
214 background: none; 222 background: none;
215 content: '!'; 223 content: '!';
216 background-color: var(--average-color); 224 color: var(--average-color);
217 color: #fff;
218 display: flex; 225 display: flex;
219 justify-content: center; 226 justify-content: center;
220 align-items: center; 227 align-items: center;
221 font-weight: 500; 228 font-weight: 500;
222 font-size: 15px; 229 font-size: 15px;
223 } 230 }
224 231
225 .lh-score__value--fail { 232 .lh-score__value--fail {
226 background: var(--fail-color); 233 color: var(--fail-color);
227 } 234 }
228 235
229 .lh-score__value--fail::after { 236 .lh-score__value--fail::after {
230 background: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox=" 0 0 12 12" xmlns="http://www.w3.org/2000/svg"><title>fail</title><path d="M8.33 2.33l1.33 1.33-2.335 2.335L9.66 8.33 8.33 9.66 5.995 7.325 3.66 9.66 2.33 8.33l2 .335-2.335L2.33 3.66l1.33-1.33 2.335 2.335z" fill="white"/></svg>') no-repeat 50 % 50%; 237 background: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox=" 0 0 12 12" xmlns="http://www.w3.org/2000/svg"><title>fail</title><path d="M8.33 2.33l1.33 1.33-2.335 2.335L9.66 8.33 8.33 9.66 5.995 7.325 3.66 9.66 2.33 8.33l2 .335-2.335L2.33 3.66l1.33-1.33 2.335 2.335z" fill="#df332f"/></svg>') no-repeat 50% 50%;
231 background-size: var(--lh-score-icon-background-size); 238 background-size: var(--lh-score-icon-background-size);
232 } 239 }
233 240
234 .lh-score__title {
235 margin-bottom: calc(var(--default-padding) / 2);
236 }
237
238 .lh-score__description { 241 .lh-score__description {
239 font-size: smaller; 242 font-size: smaller;
240 color: var(--secondary-text-color); 243 color: var(--secondary-text-color);
241 margin-top: calc(var(--default-padding) / 2); 244 margin-top: calc(var(--default-padding) / 2);
242 } 245 }
243 246
244 .lh-score__header { 247 .lh-score__snippet {
245 flex: 1; 248 align-items: center;
246 margin-top: 2px; 249 justify-content: space-between;
250 /*outline: none;*/
247 } 251 }
248 252
249 .lh-score__header[open] .lh-toggle-arrow { 253 .lh-score__snippet::-moz-list-bullet {
250 transform: rotateZ(90deg); 254 display: none;
251 } 255 }
252 256
253 .lh-toggle-arrow { 257 .lh-toggle-arrow {
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%; 258 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%;
255 background-size: contain; 259 background-size: contain;
256 background-color: transparent; 260 background-color: transparent;
257 width: 24px; 261 width: 24px;
258 height: 24px; 262 height: 24px;
259 flex: none; 263 flex: none;
260 margin-left: calc(var(--default-padding) / 2); 264 margin-left: calc(var(--default-padding) / 2);
261 transition: transform 150ms ease-in-out; 265 transition: transform 150ms ease-in-out;
262 cursor: pointer; 266 cursor: pointer;
263 border: none; 267 border: none;
264 } 268 }
265 269
266 .lh-score__snippet { 270 /* Expandable Details (Audit Groups, Audits) */
267 display: flex; 271
268 align-items: center; 272 .lh-expandable-details {
269 justify-content: space-between; 273 flex: 1;
270 /*outline: none;*/
271 } 274 }
272 275
273 .lh-score__snippet::-moz-list-bullet { 276 .lh-expandable-details__summary {
277 display: flex;
278 cursor: pointer;
279 }
280
281 .lh-expandable-details__header {
282 flex: 1;
283 }
284
285 .lh-expandable-details[open] > .lh-expandable-details__summary > .lh-toggle-arro w {
286 transform: rotateZ(90deg);
287 }
288
289 .lh-expandable-details__summary::-webkit-details-marker {
274 display: none; 290 display: none;
275 } 291 }
276 292
277 .lh-score__snippet::-webkit-details-marker {
278 display: none;
279 }
280
281 /*.lh-score__snippet:focus .lh-score__title { 293 /*.lh-score__snippet:focus .lh-score__title {
282 outline: rgb(59, 153, 252) auto 5px; 294 outline: rgb(59, 153, 252) auto 5px;
283 }*/ 295 }*/
284 296
285 /* Audit */ 297 /* Audit */
286 298
287 .lh-audit { 299 .lh-audit {
288 margin-top: var(--default-padding); 300 margin-top: var(--default-padding);
301 padding-bottom: var(--default-padding);
302 border-bottom: 1px solid var(--report-secondary-border-color);
303 }
304
305 .lh-audit:last-of-type {
306 border-bottom: none;
289 } 307 }
290 308
291 .lh-audit > .lh-score { 309 .lh-audit > .lh-score {
292 font-size: 16px; 310 font-size: 16px;
293 font-size: var(--header-font-size); 311 font-size: var(--header-font-size);
294 } 312 }
295 313
314 /* Audit Group */
315
316 .lh-audit-group {
317 margin-top: var(--default-padding);
318 padding-bottom: var(--default-padding);
319 border-bottom: 1px solid var(--report-secondary-border-color);
320 }
321
322 .lh-audit-group:last-of-type {
323 border-bottom: none;
324 }
325
326 .lh-audit-group__header {
327 font-size: 18px;
328 }
329
330 .lh-audit-group__description {
331 font-size: 16px;
332 color: var(--secondary-text-color);
333 margin-top: calc(var(--default-padding) / 2);
334 }
335
296 .lh-debug { 336 .lh-debug {
297 margin-top: calc(var(--default-padding) / 2); 337 margin-top: calc(var(--default-padding) / 2);
298 margin-left: calc(var(--lh-audit-score-width) + var(--lh-score-margin)); 338 margin-left: calc(var(--lh-audit-score-width) + var(--lh-score-margin));
299 color: var(--fail-color); 339 color: var(--fail-color);
300 } 340 }
301 341
302 /* Report */ 342 /* Report */
303 343
304 .lh-container { 344 .lh-container {
305 display: flex; 345 display: flex;
306 max-width: var(--report-content-width); 346 max-width: var(--report-content-width);
307 margin: 0 auto; 347 margin: 0 auto;
308 /*border-right: 1px solid var(--report-border-color);*/
309 /*border-left: 1px solid var(--report-border-color);*/
310 } 348 }
311 349
312 .lh-report { 350 .lh-report {
313 margin-left: var(--report-menu-width); 351 margin-left: var(--report-menu-width);
314 background-color: #fff; 352 background-color: #fff;
315 } 353 }
316 354
317 .lh-exception { 355 .lh-exception {
318 font-size: large; 356 font-size: large;
319 } 357 }
320 358
321 .lh-scores-header { 359 .lh-scores-header {
322 display: flex; 360 display: flex;
323 margin: var(--report-header-height) 0 0 0; 361 margin: var(--report-header-height) 0 0 0;
324 padding: calc(var(--default-padding) * 2) var(--default-padding); 362 padding: calc(var(--default-padding) * 2) var(--default-padding);
325 border-bottom: 1px solid var(--report-border-color); 363 border-bottom: 1px solid var(--report-border-color);
326 } 364 }
327 365
328 .lh-category { 366 .lh-category {
329 padding: 24px calc(var(--default-padding) * 2); 367 padding: 24px calc(var(--default-padding) * 2);
330 border-top: 1px solid var(--report-border-color); 368 border-top: 1px solid var(--report-border-color);
331 } 369 }
332 370
333 .lh-category:first-of-type { 371 .lh-category:first-of-type {
334 border: none; 372 border: none;
335 } 373 }
336 374
337 .lh-category > .lh-audit, 375 .lh-category .lh-audit {
338 .lh-category > .lh-passed-audits > .lh-audit {
339 margin-left: calc(var(--lh-category-score-width) + var(--lh-score-margin)); 376 margin-left: calc(var(--lh-category-score-width) + var(--lh-score-margin));
340 } 377 }
341 378
379 .lh-category .lh-audit-group {
380 margin-left: calc(var(--lh-category-score-width) + var(--default-padding));
381 }
382
383 .lh-category .lh-audit-group .lh-audit {
384 margin-left: var(--default-padding);
385 }
386
342 .lh-category > .lh-score { 387 .lh-category > .lh-score {
343 font-size: 20px; 388 font-size: 20px;
389 padding-bottom: 24px;
344 } 390 }
345 391
346 .lh-category > .lh-score .lh-score__value { 392 .lh-category > .lh-score .lh-score__value,
347 width: var(--lh-category-score-width); 393 .lh-category > .lh-score .lh-score__gauge .lh-gauge__label {
394 display: none;
395 }
396
397 .lh-category .lh-score__gauge {
398 margin: calc(var(--default-padding) / 2) var(--default-padding) 0 0;
399 flex-basis: var(--circle-size);
400 flex-shrink: 0;
401 }
402
403 .lh-category .lh-score__gauge .lh-gauge {
404 --circle-size: 60px;
348 } 405 }
349 406
350 /* Category snippet shouldnt have pointer cursor. */ 407 /* Category snippet shouldnt have pointer cursor. */
351 .lh-category > .lh-score .lh-score__snippet { 408 .lh-category > .lh-score .lh-score__snippet {
352 cursor: initial; 409 cursor: initial;
353 } 410 }
354 411
355 .lh-category > .lh-score .lh-score__title { 412 .lh-category > .lh-score .lh-score__title {
356 font-size: 24px; 413 font-size: 24px;
357 font-weight: 400; 414 font-weight: 400;
358 } 415 }
359 416
417 .lh-passed-audits[open] summary.lh-passed-audits-summary {
418 margin-bottom: calc(var(--default-padding) * 2);
419 }
420
360 summary.lh-passed-audits-summary { 421 summary.lh-passed-audits-summary {
361 margin: var(--default-padding); 422 margin: calc(var(--default-padding) * 2) var(--default-padding);
423 margin-left: calc(var(--lh-category-score-width) + var(--default-padding));
424 margin-bottom: 0;
362 font-size: 15px; 425 font-size: 15px;
363 display: flex; 426 display: flex;
364 align-items: center; 427 align-items: center;
365 } 428 }
366 429
367 summary.lh-passed-audits-summary::-webkit-details-marker { 430 summary.lh-passed-audits-summary::-webkit-details-marker {
368 background: var(--pass-color); 431 background: var(--pass-color);
369 color: white; 432 color: white;
370 position: relative; 433 position: relative;
371 content: ''; 434 content: '';
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 -webkit-print-color-adjust: exact; /* print background colors */ 480 -webkit-print-color-adjust: exact; /* print background colors */
418 } 481 }
419 .lh-report { 482 .lh-report {
420 margin-left: 0; 483 margin-left: 0;
421 } 484 }
422 .lh-categories { 485 .lh-categories {
423 margin-top: 0; 486 margin-top: 0;
424 } 487 }
425 } 488 }
426 489
490 /*# sourceURL=report.styles.css */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698