lighthouse 8.6.0-dev.20211101 → 8.6.0-dev.20211102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/report/flow.js +13 -13
  2. package/dist/report/standalone.js +11 -11
  3. package/flow-report/.eslintrc.cjs +2 -0
  4. package/flow-report/assets/styles.css +1 -1
  5. package/flow-report/src/common.tsx +11 -4
  6. package/flow-report/src/i18n/i18n.tsx +10 -6
  7. package/flow-report/src/icons.tsx +21 -9
  8. package/flow-report/src/sidebar/sidebar.tsx +9 -3
  9. package/flow-report/src/summary/category.tsx +7 -2
  10. package/flow-report/src/summary/summary.tsx +9 -3
  11. package/flow-report/src/util.ts +21 -9
  12. package/flow-report/src/wrappers/report-renderer.tsx +9 -3
  13. package/flow-report/src/wrappers/report.tsx +7 -2
  14. package/flow-report/test/setup/env-setup.ts +1 -1
  15. package/lighthouse-cli/.eslintrc.cjs +2 -0
  16. package/lighthouse-cli/cli-flags.js +1 -1
  17. package/lighthouse-core/audits/audit.js +1 -1
  18. package/lighthouse-core/computed/resource-summary.js +1 -1
  19. package/lighthouse-core/config/default-config.js +0 -2
  20. package/lighthouse-core/gather/connections/cri.js +1 -1
  21. package/lighthouse-core/lib/proto-preprocessor.js +14 -2
  22. package/lighthouse-core/lib/url-shim.js +1 -1
  23. package/lighthouse-core/util-commonjs.js +24 -9
  24. package/package.json +3 -3
  25. package/report/.eslintrc.cjs +2 -0
  26. package/report/assets/styles.css +226 -250
  27. package/report/assets/templates.html +19 -29
  28. package/report/renderer/category-renderer.js +21 -17
  29. package/report/renderer/components.js +21 -54
  30. package/report/renderer/crc-details-renderer.js +15 -12
  31. package/report/renderer/open-tab.js +9 -3
  32. package/report/renderer/performance-category-renderer.js +31 -19
  33. package/report/renderer/report-renderer.js +2 -1
  34. package/report/renderer/report-ui-features.js +2 -3
  35. package/report/renderer/util.js +25 -9
  36. package/report/test/renderer/category-renderer-test.js +2 -2
  37. package/report/test/renderer/performance-category-renderer-test.js +1 -1
  38. package/report/test/renderer/report-ui-features-test.js +7 -9
  39. package/report/test-assets/faux-psi.js +5 -5
  40. package/shared/localization/locales/ar-XB.json +0 -15
  41. package/shared/localization/locales/ar.json +0 -15
  42. package/shared/localization/locales/bg.json +0 -15
  43. package/shared/localization/locales/ca.json +0 -15
  44. package/shared/localization/locales/cs.json +0 -15
  45. package/shared/localization/locales/da.json +0 -15
  46. package/shared/localization/locales/de.json +0 -15
  47. package/shared/localization/locales/el.json +0 -15
  48. package/shared/localization/locales/en-GB.json +0 -15
  49. package/shared/localization/locales/en-US.json +18 -15
  50. package/shared/localization/locales/en-XA.json +0 -15
  51. package/shared/localization/locales/en-XL.json +18 -15
  52. package/shared/localization/locales/es-419.json +0 -15
  53. package/shared/localization/locales/es.json +0 -15
  54. package/shared/localization/locales/fi.json +0 -15
  55. package/shared/localization/locales/fil.json +0 -15
  56. package/shared/localization/locales/fr.json +0 -15
  57. package/shared/localization/locales/he.json +0 -15
  58. package/shared/localization/locales/hi.json +0 -15
  59. package/shared/localization/locales/hr.json +0 -15
  60. package/shared/localization/locales/hu.json +0 -15
  61. package/shared/localization/locales/id.json +0 -15
  62. package/shared/localization/locales/it.json +0 -15
  63. package/shared/localization/locales/ja.json +0 -15
  64. package/shared/localization/locales/ko.json +0 -15
  65. package/shared/localization/locales/lt.json +0 -15
  66. package/shared/localization/locales/lv.json +0 -15
  67. package/shared/localization/locales/nl.json +0 -15
  68. package/shared/localization/locales/no.json +0 -15
  69. package/shared/localization/locales/pl.json +0 -15
  70. package/shared/localization/locales/pt-PT.json +0 -15
  71. package/shared/localization/locales/pt.json +0 -15
  72. package/shared/localization/locales/ro.json +0 -15
  73. package/shared/localization/locales/ru.json +0 -15
  74. package/shared/localization/locales/sk.json +0 -15
  75. package/shared/localization/locales/sl.json +0 -15
  76. package/shared/localization/locales/sr-Latn.json +0 -15
  77. package/shared/localization/locales/sr.json +0 -15
  78. package/shared/localization/locales/sv.json +0 -15
  79. package/shared/localization/locales/ta.json +0 -15
  80. package/shared/localization/locales/te.json +0 -15
  81. package/shared/localization/locales/th.json +0 -15
  82. package/shared/localization/locales/tr.json +0 -15
  83. package/shared/localization/locales/uk.json +0 -15
  84. package/shared/localization/locales/vi.json +0 -15
  85. package/shared/localization/locales/zh-HK.json +0 -15
  86. package/shared/localization/locales/zh-TW.json +0 -15
  87. package/shared/localization/locales/zh.json +0 -15
  88. package/lighthouse-core/audits/dobetterweb/external-anchors-use-rel-noopener.js +0 -96
@@ -38,6 +38,7 @@
38
38
  --color-blue-200: #90CAF9;
39
39
  --color-blue-900: #0D47A1;
40
40
  --color-blue-A700: #2962FF;
41
+ --color-blue-primary: #06f;
41
42
  --color-cyan-500: #00BCD4;
42
43
  --color-gray-100: #F5F5F5;
43
44
  --color-gray-300: #CFCFCF;
@@ -50,14 +51,14 @@
50
51
  --color-gray-800: #424242;
51
52
  --color-gray-900: #212121;
52
53
  --color-gray: #000000;
53
- --color-green-700: #018642;
54
- --color-green: #0CCE6B;
54
+ --color-green-700: #080;
55
+ --color-green: #0c6;
55
56
  --color-lime-400: #D3E156;
56
57
  --color-orange-50: #FFF3E0;
57
- --color-orange-700: #D04900;
58
- --color-orange: #FFA400;
59
- --color-red-700: #EB0F00;
60
- --color-red: #FF4E42;
58
+ --color-orange-700: #C33300;
59
+ --color-orange: #fa3;
60
+ --color-red-700: #c00;
61
+ --color-red: #f33;
61
62
  --color-teal-600: #00897B;
62
63
  --color-white: #FFFFFF;
63
64
 
@@ -75,81 +76,81 @@
75
76
  /* Component variables */
76
77
  --audit-description-padding-left: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right));
77
78
  --audit-explanation-line-height: 16px;
78
- --audit-group-margin-bottom: 40px;
79
+ --audit-group-margin-bottom: calc(var(--default-padding) * 6);
79
80
  --audit-group-padding-vertical: 8px;
80
81
  --audit-margin-horizontal: 5px;
81
82
  --audit-padding-vertical: 8px;
82
- --category-padding: 40px;
83
+ --category-padding: calc(var(--default-padding) * 6) calc(var(--default-padding) * 4) calc(var(--default-padding) * 4);
83
84
  --chevron-line-stroke: var(--color-gray-600);
84
85
  --chevron-size: 12px;
85
- --default-padding: 12px;
86
+ --default-padding: 8px;
86
87
  --env-item-background-color: var(--color-gray-100);
87
88
  --env-item-font-size: 28px;
88
89
  --env-item-line-height: 36px;
89
90
  --env-item-padding: 10px 0px;
90
91
  --env-name-min-width: 220px;
91
92
  --footer-padding-vertical: 16px;
92
- --gauge-circle-size-big: 112px;
93
- --gauge-circle-size: 80px;
94
- --gauge-circle-size-sm: 36px;
95
- --gauge-label-font-size-big: 28px;
96
- --gauge-label-font-size: 20px;
97
- --gauge-label-line-height-big: 36px;
98
- --gauge-label-line-height: 26px;
93
+ --gauge-circle-size-big: 96px;
94
+ --gauge-circle-size: 48px;
95
+ --gauge-circle-size-sm: 32px;
96
+ --gauge-label-font-size-big: 18px;
97
+ --gauge-label-font-size: var(--report-font-size-secondary);
98
+ --gauge-label-line-height-big: 24px;
99
+ --gauge-label-line-height: var(--report-line-height-secondary);
99
100
  --gauge-percentage-font-size-big: 38px;
100
- --gauge-percentage-font-size: 28px;
101
- --gauge-wrapper-width: 148px;
101
+ --gauge-percentage-font-size: var(--report-font-size-secondary);
102
+ --gauge-wrapper-width: 120px;
102
103
  --header-line-height: 24px;
103
104
  --highlighter-background-color: var(--report-text-color);
104
105
  --icon-square-size: calc(var(--score-icon-size) * 0.88);
105
106
  --image-preview-size: 48px;
107
+ --link-color: var(--color-blue-primary);
106
108
  --locale-selector-background-color: var(--color-white);
107
109
  --metric-toggle-lines-fill: #7F7F7F;
108
- --metric-value-font-size: 28px;
110
+ --metric-value-font-size: calc(var(--report-font-size) * 1.8);
109
111
  --metrics-toggle-background-color: var(--color-gray-200);
110
112
  --plugin-badge-background-color: var(--color-white);
111
113
  --plugin-badge-size-big: calc(var(--gauge-circle-size-big) / 2.7);
112
114
  --plugin-badge-size: calc(var(--gauge-circle-size) / 2.7);
113
115
  --plugin-icon-size: 65%;
114
- --pwa-icon-margin: 0 6px 0 -2px;
116
+ --pwa-icon-margin: 0 var(--default-padding);
115
117
  --pwa-icon-size: var(--topbar-logo-size);
116
118
  --report-background-color: #fff;
117
119
  --report-border-color-secondary: #ebebeb;
118
120
  --report-font-family-monospace: 'Roboto Mono', 'Menlo', 'dejavu sans mono', 'Consolas', 'Lucida Console', monospace;
119
121
  --report-font-family: Roboto, Helvetica, Arial, sans-serif;
120
- --report-font-size: 16px;
122
+ --report-font-size: 14px;
123
+ --report-font-size-secondary: 12px;
121
124
  --report-icon-size: var(--score-icon-background-size);
122
125
  --report-line-height: 24px;
123
- --report-min-width: 400px;
126
+ --report-line-height-secondary: 20px;
127
+ --report-min-width: 360px;
124
128
  --report-monospace-font-size: calc(var(--report-font-size) * 0.85);
125
129
  --report-text-color-secondary: var(--color-gray-800);
126
130
  --report-text-color: var(--color-gray-900);
127
- --report-width: calc(60 * var(--report-font-size));
131
+ --report-content-width: calc(60 * var(--report-font-size)); /* defaults to 840px */
128
132
  --score-container-padding: 8px;
129
133
  --score-icon-background-size: 24px;
130
- --score-icon-margin-left: 4px;
131
- --score-icon-margin-right: 12px;
134
+ --score-icon-margin-left: 6px;
135
+ --score-icon-margin-right: 14px;
132
136
  --score-icon-margin: 0 var(--score-icon-margin-right) 0 var(--score-icon-margin-left);
133
137
  --score-icon-size: 12px;
134
138
  --score-icon-size-big: 16px;
135
- --scores-container-padding: 20px 0 20px 0;
136
- --scorescale-height: 6px;
137
- --scorescale-width: 18px;
138
139
  --screenshot-overlay-background: rgba(0, 0, 0, 0.3);
139
- --section-padding-vertical: 12px;
140
+ --section-padding-vertical: calc(var(--default-padding) * 6);
140
141
  --snippet-background-color: var(--color-gray-50);
141
142
  --snippet-color: #0938C2;
142
143
  --sparkline-height: 5px;
143
144
  --stackpack-padding-horizontal: 10px;
144
145
  --sticky-header-background-color: var(--report-background-color);
145
- --table-higlight-background-color: hsla(0, 0%, 75%, 0.1);
146
+ --table-higlight-background-color: hsla(210, 17%, 77%, 0.1);
146
147
  --tools-icon-color: var(--color-gray-600);
147
- --topbar-background-color: var(--color-gray-100);
148
+ --topbar-background-color: var(--color-white);
148
149
  --topbar-height: 32px;
149
150
  --topbar-logo-size: 24px;
150
151
  --topbar-padding: 0 8px;
151
- --toplevel-warning-background-color: var(--color-orange-50);
152
- --toplevel-warning-message-text-color: #BD4200;
152
+ --toplevel-warning-background-color: hsla(30, 100%, 75%, 10%);
153
+ --toplevel-warning-message-text-color: var(--color-average-secondary);
153
154
  --toplevel-warning-padding: 18px;
154
155
  --toplevel-warning-text-color: var(--report-text-color);
155
156
 
@@ -193,6 +194,7 @@
193
194
 
194
195
  /* Component variables */
195
196
  --env-item-background-color: #393535;
197
+ --link-color: var(--color-blue-200);
196
198
  --locale-selector-background-color: var(--color-gray-200);
197
199
  --plugin-badge-background-color: var(--color-gray-800);
198
200
  --report-background-color: var(--color-gray-900);
@@ -201,9 +203,9 @@
201
203
  --report-text-color: var(--color-gray-100);
202
204
  --snippet-color: var(--color-cyan-500);
203
205
  --topbar-background-color: var(--color-gray);
204
- --toplevel-warning-background-color: #544B40;
205
- --toplevel-warning-message-text-color: var(--color-orange-700);
206
- --toplevel-warning-text-color: var(--color-gray-100);
206
+ --toplevel-warning-background-color: hsl(33deg 14% 18%);
207
+ --toplevel-warning-message-text-color: var(--color-orange-700);
208
+ --toplevel-warning-text-color: var(--color-gray-100);
207
209
 
208
210
  /* SVGs */
209
211
  --plugin-icon-url: var(--plugin-icon-url-dark);
@@ -215,7 +217,7 @@
215
217
  @media only screen and (max-width: 480px) {
216
218
  .lh-vars {
217
219
  --audit-group-margin-bottom: 20px;
218
- --category-padding: 24px;
220
+ --category-padding: 12px;
219
221
  --env-name-min-width: 120px;
220
222
  --gauge-circle-size-big: 96px;
221
223
  --gauge-circle-size: 72px;
@@ -304,7 +306,6 @@
304
306
 
305
307
  .lh-root *, .lh-root *::before, .lh-root *::after {
306
308
  box-sizing: border-box;
307
- -webkit-font-smoothing: antialiased;
308
309
  }
309
310
 
310
311
  .lh-root {
@@ -367,7 +368,7 @@
367
368
  .lh-warnings a,
368
369
  .lh-footer a,
369
370
  .lh-table-column--link a {
370
- color: var(--color-informative);
371
+ color: var(--link-color);
371
372
  }
372
373
 
373
374
  .lh-audit__description, .lh-audit__stackpack {
@@ -379,7 +380,6 @@
379
380
  }
380
381
 
381
382
  .lh-details {
382
- font-size: var(--report-font-size);
383
383
  margin-top: var(--default-padding);
384
384
  margin-bottom: var(--default-padding);
385
385
  margin-left: var(--audit-description-padding-left);
@@ -393,7 +393,7 @@
393
393
  }
394
394
 
395
395
  .lh-audit__stackpack__img {
396
- max-width: 50px;
396
+ max-width: 30px;
397
397
  margin-right: var(--default-padding)
398
398
  }
399
399
 
@@ -412,7 +412,7 @@
412
412
 
413
413
  .lh-report-icon::before {
414
414
  content: "";
415
- margin-right: 5px;
415
+ margin: 4px;
416
416
  background-repeat: no-repeat;
417
417
  width: var(--report-icon-size);
418
418
  height: var(--report-icon-size);
@@ -474,22 +474,22 @@
474
474
  .lh-buttons {
475
475
  display: flex;
476
476
  flex-wrap: wrap;
477
+ margin: var(--default-padding) 0;
477
478
  }
478
479
  .lh-button {
479
- margin: 10px;
480
- height: 30px;
481
- border: 1px solid var(--color-gray-600);
482
- border-radius: 4px;
483
- font-weight: bold;
484
- color: rgb(26, 115, 232);
480
+ height: 32px;
481
+ border: 1px solid var(--report-border-color-secondary);
482
+ border-radius: 3px;
483
+ color: var(--link-color);
485
484
  background-color: var(--report-background-color);
485
+ padding: var(--default-padding);
486
+ font-size: var(--report-font-size-secondary);
487
+ line-height: var(--report-line-height-secondary);
486
488
  }
489
+
487
490
  .lh-button:first-of-type {
488
491
  margin-left: 0;
489
492
  }
490
- .lh-dark .lh-button {
491
- color: var(--color-blue-200);
492
- }
493
493
 
494
494
  /* Node */
495
495
  .lh-node__snippet {
@@ -572,8 +572,8 @@
572
572
  }
573
573
 
574
574
  .lh-category-header__description {
575
- font-size: var(--report-font-size);
576
575
  text-align: center;
576
+ color: var(--color-gray-700);
577
577
  margin: 0px auto;
578
578
  max-width: 400px;
579
579
  }
@@ -610,8 +610,7 @@
610
610
  .lh-audit__header {
611
611
  display: flex;
612
612
  align-items: center;
613
- font-weight: 500;
614
- padding: var(--audit-padding-vertical) 0;
613
+ padding: var(--default-padding);
615
614
  }
616
615
 
617
616
  .lh-audit--load-opportunity .lh-audit__header {
@@ -620,8 +619,12 @@
620
619
 
621
620
 
622
621
  .lh-metricfilter {
623
- text-align: right;
624
- margin-top: var(--default-padding);
622
+ display: grid;
623
+ justify-content: end;
624
+ align-items: center;
625
+ grid-auto-flow: column;
626
+ gap: 4px;
627
+ color: var(--color-gray-700);
625
628
  }
626
629
 
627
630
  .lh-metricfilter__radio {
@@ -633,29 +636,20 @@
633
636
  }
634
637
 
635
638
  .lh-metricfilter__label {
636
- border: solid 1px var(--color-gray-400);
639
+ display: inline-flex;
640
+ padding: 0 4px;
641
+ height: 16px;
642
+ text-decoration: underline;
637
643
  align-items: center;
638
- justify-content: center;
639
- padding: 2px 5px;
640
- width: 50%;
641
- height: 28px;
642
644
  cursor: pointer;
643
645
  font-size: 90%;
644
646
  }
645
647
 
646
- .lh-metricfilter__label:first-of-type {
647
- border-top-left-radius: 5px;
648
- border-bottom-left-radius: 5px;
649
- margin-left: 5px;
650
- }
651
- .lh-metricfilter__label:last-of-type {
652
- border-top-right-radius: 5px;
653
- border-bottom-right-radius: 5px;
654
- }
655
-
656
648
  .lh-metricfilter__label--active {
657
- background: var(--color-blue-A700);
649
+ background: var(--color-blue-primary);
658
650
  color: var(--color-white);
651
+ border-radius: 3px;
652
+ text-decoration: none;
659
653
  }
660
654
  /* Give the 'All' choice a more muted display */
661
655
  .lh-metricfilter__label--active[for="metric-All"] {
@@ -663,6 +657,10 @@
663
657
  color: black !important;
664
658
  }
665
659
 
660
+ .lh-metricfilter__text {
661
+ margin-right: 8px;
662
+ }
663
+
666
664
  /* If audits are filtered, hide the itemcount for Passed Audits… */
667
665
  .lh-category--filtered .lh-audit-group .lh-audit-group__itemcount {
668
666
  display: none;
@@ -674,14 +672,12 @@
674
672
  }
675
673
 
676
674
  /* We want to hide the browser's default arrow marker on summary elements. Admittedly, it's complicated. */
677
- .lh-audit-group > summary,
678
- .lh-expandable-details > summary {
675
+ .lh-root details > summary {
679
676
  /* Blink 89+ and Firefox will hide the arrow when display is changed from (new) default of `list-item` to block. https://chromestatus.com/feature/6730096436051968*/
680
677
  display: block;
681
678
  }
682
679
  /* Safari and Blink <=88 require using the -webkit-details-marker selector */
683
- .lh-audit-group > summary::-webkit-details-marker,
684
- .lh-expandable-details > summary::-webkit-details-marker {
680
+ .lh-root details > summary::-webkit-details-marker {
685
681
  display: none;
686
682
  }
687
683
 
@@ -699,21 +695,10 @@
699
695
  border-top: 1px solid var(--report-border-color-secondary);
700
696
  }
701
697
 
702
- @media screen and (min-width: 640px) {
703
- .lh-metric:nth-child(3n+3) {
704
- border-bottom: 1px solid var(--report-border-color-secondary);
705
- }
698
+ .lh-metric:nth-child(3n+3) {
699
+ border-bottom: 1px solid var(--report-border-color-secondary);
706
700
  }
707
701
 
708
- @media screen and (max-width: 640px) {
709
- .lh-metrics-container {
710
- display: block;
711
- }
712
-
713
- .lh-metric:nth-last-child(-n+1) {
714
- border-bottom: 1px solid var(--report-border-color-secondary);
715
- }
716
- }
717
702
 
718
703
  .lh-metric__innerwrap {
719
704
  display: grid;
@@ -723,7 +708,7 @@
723
708
  */
724
709
  grid-template-columns: calc(var(--score-icon-size) + var(--score-icon-margin-left) + var(--score-icon-margin-right)) 1fr;
725
710
  align-items: center;
726
- padding: 10px 0;
711
+ padding: var(--default-padding);
727
712
  }
728
713
 
729
714
  .lh-metric__details {
@@ -732,12 +717,6 @@
732
717
 
733
718
  .lh-metric__title {
734
719
  flex: 1;
735
- font-weight: 500;
736
- }
737
-
738
- .lh-metrics__disclaimer {
739
- color: var(--color-gray-600);
740
- margin: var(--section-padding-vertical) 0;
741
720
  }
742
721
 
743
722
  .lh-calclink {
@@ -755,12 +734,20 @@
755
734
  font-size: var(--metric-value-font-size);
756
735
  margin: calc(var(--default-padding) / 2) 0;
757
736
  white-space: nowrap; /* No wrapping between metric value and the icon */
758
- font-weight: 500;
759
737
  grid-column-start: 2;
760
738
  }
761
739
 
762
- /* Change the grid to 3 columns for narrow viewport. */
740
+
763
741
  @media screen and (max-width: 535px) {
742
+ .lh-metrics-container {
743
+ display: block;
744
+ }
745
+
746
+ .lh-metric:nth-last-child(-n+1) {
747
+ border-bottom: 1px solid var(--report-border-color-secondary);
748
+ }
749
+
750
+ /* Change the grid to 3 columns for narrow viewport. */
764
751
  .lh-metric__innerwrap {
765
752
  /**
766
753
  * Icon -- Metric Name -- Metric Value
@@ -779,62 +766,36 @@
779
766
  display: block;
780
767
  }
781
768
 
769
+ /* TODO get rid of the SVGS and clean up these some more */
782
770
  .lh-metrics-toggle__input {
783
- cursor: pointer;
784
771
  opacity: 0;
785
772
  position: absolute;
786
773
  right: 0;
787
- width: 74px;
788
- height: 28px;
789
- top: -3px;
774
+ top: 0px;
790
775
  }
791
- .lh-metrics-toggle__label {
792
- display: flex;
793
- background-color: #eee;
794
- border-radius: 20px;
795
- overflow: hidden;
796
- position: absolute;
797
- right: 0;
798
- top: -3px;
799
- pointer-events: none;
800
- }
801
- .lh-metrics-toggle__input:focus + label {
802
- outline: -webkit-focus-ring-color auto 3px;
803
- }
804
- .lh-metrics-toggle__icon {
805
- display: flex;
806
- align-items: center;
807
- justify-content: center;
808
- padding: 2px 5px;
809
- width: 50%;
810
- height: 28px;
811
- }
812
- .lh-metrics-toggle__input:not(:checked) + label .lh-metrics-toggle__icon--less,
813
- .lh-metrics-toggle__input:checked + label .lh-metrics-toggle__icon--more {
814
- background-color: var(--color-blue-A700);
815
- --metric-toggle-lines-fill: var(--color-white);
776
+
777
+ .lh-metrics-toggle__input + div > label > .lh-metrics-toggle__labeltext--hide,
778
+ .lh-metrics-toggle__input:checked + div > label > .lh-metrics-toggle__labeltext--show {
779
+ display: none;
816
780
  }
817
- .lh-metrics-toggle__lines {
818
- fill: var(--metric-toggle-lines-fill);
781
+ .lh-metrics-toggle__input:checked + div > label > .lh-metrics-toggle__labeltext--hide {
782
+ display: inline;
819
783
  }
820
-
821
- .lh-metrics-toggle__label {
822
- background-color: var(--metrics-toggle-background-color);
784
+ .lh-metrics-toggle__input:focus + div > label {
785
+ outline: -webkit-focus-ring-color auto 3px;
823
786
  }
824
787
 
825
- .lh-metrics-toggle__label .lh-metrics-toggle__icon--less {
826
- padding-left: 8px;
827
- }
828
- .lh-metrics-toggle__label .lh-metrics-toggle__icon--more {
829
- padding-right: 8px;
788
+ .lh-metrics-toggle__label {
789
+ cursor: pointer;
790
+ font-size: var(--report-font-size-secondary);
791
+ line-height: var(--report-line-height-secondary);
792
+ color: var(--color-gray-700);
830
793
  }
831
794
 
832
795
  /* Pushes the metric description toggle button to the right. */
833
796
  .lh-audit-group--metrics .lh-audit-group__header {
834
797
  display: flex;
835
- }
836
- .lh-audit-group--metrics .lh-audit-group__header span.lh-audit-group__title {
837
- flex: 1;
798
+ justify-content: space-between;
838
799
  }
839
800
 
840
801
  .lh-metric__icon,
@@ -948,10 +909,11 @@
948
909
  }
949
910
 
950
911
  .lh-filmstrip {
951
- display: flex;
952
- flex-direction: row;
912
+ display: grid;
953
913
  justify-content: space-between;
954
914
  padding-bottom: var(--default-padding);
915
+ width: 100%;
916
+ grid-template-columns: repeat(auto-fit, 60px);
955
917
  }
956
918
 
957
919
  .lh-filmstrip__frame {
@@ -965,20 +927,6 @@
965
927
  max-width: 60px;
966
928
  }
967
929
 
968
- @media screen and (max-width: 750px) {
969
- .lh-filmstrip {
970
- flex-wrap: wrap;
971
- }
972
- .lh-filmstrip__frame {
973
- width: 20%;
974
- margin-bottom: 5px;
975
- }
976
- .lh-filmstrip__thumbnail {
977
- display: block;
978
- margin: auto;
979
- }
980
- }
981
-
982
930
  /* Audit */
983
931
 
984
932
  .lh-audit {
@@ -1030,9 +978,9 @@
1030
978
  text-align: right;
1031
979
  }
1032
980
 
1033
- .lh-audit-group--budgets .lh-table {
981
+ .lh-audit-group--budgets .lh-details--budget {
1034
982
  width: 100%;
1035
- margin: 16px 0px 16px 0px;
983
+ margin: 0 0 var(--default-padding);
1036
984
  }
1037
985
 
1038
986
  .lh-audit-group--pwa-installable .lh-audit-group__header::before {
@@ -1058,61 +1006,46 @@
1058
1006
  .lh-audit-group__summary {
1059
1007
  display: flex;
1060
1008
  justify-content: space-between;
1061
- margin-top: calc(var(--category-padding) * 1.5);
1062
- margin-bottom: var(--category-padding);
1009
+ align-items: center;
1063
1010
  }
1064
1011
 
1065
- .lh-audit-group__itemcount {
1066
- color: var(--color-gray-600);
1067
- font-weight: bold;
1068
- }
1069
1012
  .lh-audit-group__header .lh-chevron {
1070
1013
  margin-top: calc((var(--report-line-height) - 5px) / 2);
1071
1014
  }
1072
1015
 
1073
1016
  .lh-audit-group__header {
1074
- font-size: var(--report-font-size);
1075
- margin: 0 0 var(--audit-group-padding-vertical);
1076
- /* When the header takes 100% width, the chevron becomes small. */
1077
- max-width: calc(100% - var(--chevron-size));
1078
- }
1079
- /* max-width makes the metric toggle not flush. metrics doesn't have a chevron so unset. */
1080
- .lh-audit-group--metrics .lh-audit-group__header {
1081
- max-width: unset;
1017
+ letter-spacing: 0.8px;
1018
+ padding: var(--default-padding);
1019
+ padding-left: 0;
1082
1020
  }
1083
1021
 
1084
- .lh-audit-group__header span.lh-audit-group__title {
1085
- font-weight: bold;
1022
+ .lh-audit-group__header, .lh-audit-group__summary {
1023
+ font-size: var(--report-font-size-secondary);
1024
+ line-height: var(--report-line-height-secondary);
1025
+ color: var(--color-gray-700);
1086
1026
  }
1087
1027
 
1088
- .lh-audit-group__header span.lh-audit-group__itemcount {
1089
- font-weight: bold;
1090
- color: var(--color-gray-600);
1028
+ .lh-audit-group__title {
1029
+ text-transform: uppercase;
1030
+ font-weight: 500;
1091
1031
  }
1092
1032
 
1093
- .lh-audit-group__header span.lh-audit-group__description {
1094
- font-weight: 500;
1033
+ .lh-audit-group__itemcount {
1095
1034
  color: var(--color-gray-600);
1096
1035
  }
1097
- .lh-audit-group__header span.lh-audit-group__description::before {
1098
- content: '—';
1099
- margin: 0px var(--audit-margin-horizontal);
1100
- }
1101
1036
 
1102
- .lh-clump > .lh-audit-group__header,
1103
- .lh-audit-group--diagnostics .lh-audit-group__header,
1104
- .lh-audit-group--load-opportunities .lh-audit-group__header,
1105
- .lh-audit-group--metrics .lh-audit-group__header,
1106
- .lh-audit-group--pwa-installable .lh-audit-group__header,
1107
- .lh-audit-group--pwa-optimized .lh-audit-group__header {
1108
- margin-top: var(--audit-group-padding-vertical);
1037
+ .lh-audit-group__footer {
1038
+ color: var(--color-gray-600);
1039
+ display: block;
1040
+ margin-top: var(--default-padding);
1109
1041
  }
1110
1042
 
1111
- /* Our report design omits the header 'Metrics', as they're clearly the metrics.
1112
- It's more straightforward to hide w/ CSS vs change categoryRenderer.renderAuditGroup for this case. */
1113
- .lh-audit-group--metrics > .lh-audit-group__header {
1114
- /* Also, it's vis hidden (and not display:none) because of spacing regarding the pill. */
1115
- visibility: hidden;
1043
+ .lh-details,
1044
+ .lh-category-header__description,
1045
+ .lh-load-opportunity__header,
1046
+ .lh-audit-group__footer {
1047
+ font-size: var(--report-font-size-secondary);
1048
+ line-height: var(--report-line-height-secondary);
1116
1049
  }
1117
1050
 
1118
1051
  .lh-audit-explanation {
@@ -1153,9 +1086,13 @@
1153
1086
 
1154
1087
  .lh-warnings {
1155
1088
  --item-margin: calc(var(--report-line-height) / 6);
1156
- color: var(--color-average);
1089
+ color: var(--color-average-secondary);
1157
1090
  margin: var(--audit-padding-vertical) 0;
1158
- padding: calc(var(--audit-padding-vertical) / 2) calc(var(--audit-description-padding-left));
1091
+ padding: var(--default-padding)
1092
+ var(--default-padding)
1093
+ var(--default-padding)
1094
+ calc(var(--audit-description-padding-left));
1095
+ background-color: var(--toplevel-warning-background-color);
1159
1096
  }
1160
1097
  .lh-warnings span {
1161
1098
  font-weight: bold;
@@ -1166,8 +1103,8 @@
1166
1103
  color: var(--toplevel-warning-text-color);
1167
1104
  margin-left: auto;
1168
1105
  margin-right: auto;
1169
- max-width: calc(var(--report-width) - var(--category-padding) * 2);
1170
- background-color: var(--toplevel-warning-background-color);
1106
+ --content-width-minus-category-padding-sides: calc(var(--report-content-width) - calc(var(--default-padding) * 4) * 2);
1107
+ max-width: var(--content-width-minus-category-padding-sides);
1171
1108
  padding: var(--toplevel-warning-padding);
1172
1109
  border-radius: 8px;
1173
1110
  }
@@ -1200,19 +1137,19 @@
1200
1137
  /* Gauge */
1201
1138
 
1202
1139
  .lh-gauge__wrapper--pass {
1203
- color: var(--color-pass);
1140
+ color: var(--color-pass-secondary);
1204
1141
  fill: var(--color-pass);
1205
1142
  stroke: var(--color-pass);
1206
1143
  }
1207
1144
 
1208
1145
  .lh-gauge__wrapper--average {
1209
- color: var(--color-average);
1146
+ color: var(--color-average-secondary);
1210
1147
  fill: var(--color-average);
1211
1148
  stroke: var(--color-average);
1212
1149
  }
1213
1150
 
1214
1151
  .lh-gauge__wrapper--fail {
1215
- color: var(--color-fail);
1152
+ color: var(--color-fail-secondary);
1216
1153
  fill: var(--color-fail);
1217
1154
  stroke: var(--color-fail);
1218
1155
  }
@@ -1231,7 +1168,7 @@
1231
1168
  display: inline-block;
1232
1169
  }
1233
1170
  .lh-fraction__wrapper--pass .lh-fraction__content {
1234
- color: var(--color-pass);
1171
+ color: var(--color-pass-secondary);
1235
1172
  }
1236
1173
  .lh-fraction__wrapper--pass .lh-fraction__background {
1237
1174
  background-color: var(--color-pass);
@@ -1241,11 +1178,9 @@
1241
1178
  border-radius: 50%;
1242
1179
  }
1243
1180
  .lh-fraction__wrapper--average .lh-fraction__content {
1244
- color: var(--color-average);
1245
- }
1246
- .lh-fraction__wrapper--average .lh-fraction__background {
1247
- background-color: var(--color-average);
1181
+ color: var(--color-average-secondary);
1248
1182
  }
1183
+ .lh-fraction__wrapper--average .lh-fraction__background,
1249
1184
  .lh-fraction__wrapper--average .lh-fraction__content::before {
1250
1185
  background-color: var(--color-average);
1251
1186
  }
@@ -1392,6 +1327,7 @@
1392
1327
  .lh-gauge__label,
1393
1328
  .lh-fraction__label {
1394
1329
  font-size: var(--gauge-label-font-size);
1330
+ font-weight: 500;
1395
1331
  line-height: var(--gauge-label-line-height);
1396
1332
  margin-top: 10px;
1397
1333
  text-align: center;
@@ -1417,20 +1353,36 @@
1417
1353
 
1418
1354
  .lh-scorescale {
1419
1355
  display: inline-flex;
1420
- margin: 12px auto 0 auto;
1421
- border: 1px solid var(--color-gray-200);
1422
- border-radius: 20px;
1423
- padding: 8px 8px;
1356
+
1357
+ gap: calc(var(--default-padding) * 4);
1358
+ margin: 16px auto 0 auto;
1359
+ font-size: var(--report-font-size-secondary);
1360
+ color: var(--color-gray-700);
1361
+
1424
1362
  }
1425
1363
 
1426
1364
  .lh-scorescale-range {
1427
1365
  display: flex;
1428
1366
  align-items: center;
1429
- margin: 0 12px;
1430
1367
  font-family: var(--report-font-family-monospace);
1431
1368
  white-space: nowrap;
1432
1369
  }
1433
1370
 
1371
+ .lh-category-header__finalscreenshot .lh-scorescale {
1372
+ border: 0;
1373
+ display: flex;
1374
+ justify-content: center;
1375
+ }
1376
+
1377
+ .lh-category-header__finalscreenshot .lh-scorescale-range {
1378
+ font-family: unset;
1379
+ font-size: 12px;
1380
+ }
1381
+
1382
+ .lh-scorescale-wrap {
1383
+ display: contents;
1384
+ }
1385
+
1434
1386
  /* Hide category score gauages if it's a single category report */
1435
1387
  .lh-header--solo-category .lh-scores-wrapper {
1436
1388
  display: none;
@@ -1444,12 +1396,16 @@
1444
1396
 
1445
1397
  .lh-category {
1446
1398
  padding: var(--category-padding);
1447
- max-width: var(--report-width);
1399
+ max-width: var(--report-content-width);
1448
1400
  margin: 0 auto;
1449
1401
 
1450
1402
  --sticky-header-height: calc(var(--gauge-circle-size-sm) + var(--score-container-padding) * 2);
1451
1403
  --topbar-plus-sticky-header: calc(var(--topbar-height) + var(--sticky-header-height));
1452
1404
  scroll-margin-top: var(--topbar-plus-sticky-header);
1405
+
1406
+ /* Faster recalc style & layout of the report. https://web.dev/content-visibility/ */
1407
+ content-visibility: auto;
1408
+ contain-intrinsic-size: 1000px;
1453
1409
  }
1454
1410
 
1455
1411
  .lh-category-wrapper {
@@ -1476,18 +1432,8 @@
1476
1432
  justify-items: center;
1477
1433
  align-items: center;
1478
1434
  gap: var(--report-line-height);
1479
- }
1480
-
1481
- .lh-category-header__finalscreenshot .lh-scorescale {
1482
- border: 0;
1483
- padding: 0;
1484
- display: flex;
1485
- justify-content: center;
1486
- }
1487
-
1488
- .lh-category-header__finalscreenshot .lh-scorescale-range {
1489
- font-family: unset;
1490
- font-size: 12px;
1435
+ min-height: 288px;
1436
+ margin-bottom: var(--default-padding);
1491
1437
  }
1492
1438
 
1493
1439
  .lh-final-ss-image {
@@ -1497,6 +1443,7 @@
1497
1443
  border: 1px solid var(--color-gray-200);
1498
1444
  padding: 4px;
1499
1445
  border-radius: 3px;
1446
+ display: block;
1500
1447
  }
1501
1448
 
1502
1449
  .lh-category-headercol--separator {
@@ -1505,7 +1452,7 @@
1505
1452
  height: var(--gauge-circle-size-big);
1506
1453
  }
1507
1454
 
1508
- @media screen and (max-width: 535px) {
1455
+ @media screen and (max-width: 780px) {
1509
1456
  .lh-category-header__finalscreenshot {
1510
1457
  grid-template: 1fr 1fr / none
1511
1458
  }
@@ -1542,7 +1489,9 @@
1542
1489
  .lh-table {
1543
1490
  border-collapse: collapse;
1544
1491
  /* Can't assign padding to table, so shorten the width instead. */
1545
- width: calc(100% - var(--audit-description-padding-left));
1492
+ width: calc(100% - var(--audit-description-padding-left) - var(--stackpack-padding-horizontal));
1493
+ border: 1px solid var(--report-border-color-secondary);
1494
+
1546
1495
  }
1547
1496
 
1548
1497
  .lh-table thead th {
@@ -1552,7 +1501,7 @@
1552
1501
  word-break: normal;
1553
1502
  }
1554
1503
 
1555
- .lh-row--odd {
1504
+ .lh-row--even {
1556
1505
  background-color: var(--table-higlight-background-color);
1557
1506
  }
1558
1507
  .lh-row--hidden {
@@ -1561,13 +1510,7 @@
1561
1510
 
1562
1511
  .lh-table th,
1563
1512
  .lh-table td {
1564
- padding: 8px 6px;
1565
- }
1566
- .lh-table th:first-child {
1567
- padding-left: 0;
1568
- }
1569
- .lh-table th:last-child {
1570
- padding-right: 0;
1513
+ padding: var(--default-padding);
1571
1514
  }
1572
1515
 
1573
1516
  .lh-table tr {
@@ -1601,7 +1544,6 @@
1601
1544
 
1602
1545
  .lh-table .lh-table-column--thumbnail {
1603
1546
  width: var(--image-preview-size);
1604
- padding: 0;
1605
1547
  }
1606
1548
 
1607
1549
  .lh-table-column--url {
@@ -1689,23 +1631,54 @@
1689
1631
  transition: transform 300ms, stroke 300ms;
1690
1632
  }
1691
1633
 
1692
- .lh-audit-group > summary > .lh-audit-group__summary > .lh-chevron .lh-chevron__line-right,
1693
- .lh-audit-group[open] > summary > .lh-audit-group__summary > .lh-chevron .lh-chevron__line-left,
1694
- .lh-audit > .lh-expandable-details .lh-chevron__line-right,
1695
- .lh-audit > .lh-expandable-details[open] .lh-chevron__line-left {
1634
+ .lh-expandable-details .lh-chevron__line-right,
1635
+ .lh-expandable-details[open] .lh-chevron__line-left {
1696
1636
  transform: rotate(var(--chevron-angle-right));
1697
1637
  }
1698
1638
 
1699
- .lh-audit-group[open] > summary > .lh-audit-group__summary > .lh-chevron .lh-chevron__line-right,
1700
- .lh-audit > .lh-expandable-details[open] .lh-chevron__line-right {
1639
+ .lh-expandable-details[open] .lh-chevron__line-right {
1701
1640
  transform: rotate(var(--chevron-angle));
1702
1641
  }
1703
1642
 
1704
- .lh-audit-group[open] > summary > .lh-audit-group__summary > .lh-chevron .lh-chevron__lines,
1705
- .lh-audit > .lh-expandable-details[open] .lh-chevron__lines {
1643
+
1644
+ .lh-expandable-details[open] .lh-chevron__lines {
1706
1645
  transform: translateY(calc(var(--chevron-size) * -1));
1707
1646
  }
1708
1647
 
1648
+ .lh-expandable-details[open] {
1649
+ animation: 300ms openDetails forwards;
1650
+ padding-bottom: var(--default-padding);
1651
+ }
1652
+
1653
+ @keyframes openDetails {
1654
+ from {
1655
+ outline: 1px solid var(--report-background-color);
1656
+ }
1657
+ to {
1658
+ outline: 1px solid;
1659
+ box-shadow: 0 2px 4px rgba(0, 0, 0, .24);
1660
+ }
1661
+ }
1662
+
1663
+ @media screen and (max-width: 780px) {
1664
+ /* no black outline if we're not confident the entire table can be displayed within bounds */
1665
+ .lh-expandable-details[open] {
1666
+ animation: none;
1667
+ }
1668
+ }
1669
+
1670
+ .lh-expandable-details[open] summary, details.lh-clump > summary {
1671
+ border-bottom: 1px solid var(--report-border-color-secondary);
1672
+ }
1673
+ details.lh-clump[open] > summary {
1674
+ border-bottom-width: 0;
1675
+ }
1676
+
1677
+
1678
+
1679
+ details .lh-clump-toggletext--hide,
1680
+ details[open] .lh-clump-toggletext--show { display: none; }
1681
+ details[open] .lh-clump-toggletext--hide { display: block;}
1709
1682
 
1710
1683
 
1711
1684
  /* Tooltip */
@@ -1820,20 +1793,23 @@
1820
1793
 
1821
1794
 
1822
1795
  .lh-meta__items {
1796
+ --meta-icon-size: calc(var(--report-icon-size) * 0.667);
1797
+ padding: var(--default-padding);
1823
1798
  display: grid;
1824
1799
  grid-template-columns: 1fr 1fr 1fr;
1825
1800
  background-color: var(--env-item-background-color);
1826
1801
  border-radius: 3px;
1827
- padding: 0;
1828
- font-size: 13px;
1829
- padding-bottom: calc(var(--default-padding) / 2);
1802
+ margin: 0 0 var(--default-padding) 0;
1803
+ font-size: 12px;
1804
+ column-gap: var(--default-padding);
1805
+ color: var(--color-gray-700);
1830
1806
  }
1831
1807
 
1832
1808
  .lh-meta__item {
1833
1809
  display: block;
1834
1810
  list-style-type: none;
1835
1811
  position: relative;
1836
- padding: calc(var(--default-padding) / 2) 0 0 calc(var(--default-padding) * 3);
1812
+ padding: 0 0 0 calc(var(--meta-icon-size) + var(--default-padding) * 2);
1837
1813
  cursor: unset; /* disable pointer cursor from report-icon */
1838
1814
  }
1839
1815
 
@@ -1845,8 +1821,8 @@
1845
1821
  .lh-meta__item.lh-report-icon::before {
1846
1822
  position: absolute;
1847
1823
  left: var(--default-padding);
1848
- width: calc(var(--report-icon-size) * 0.8);
1849
- height: calc(var(--report-icon-size) * 0.8);
1824
+ width: var(--meta-icon-size);
1825
+ height: var(--meta-icon-size);
1850
1826
  }
1851
1827
 
1852
1828
  .lh-meta__item.lh-report-icon:hover::before {