Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Measure page fixes (#6634)
Browse files Browse the repository at this point in the history
* Fix measure page CLS

* disable dark theme in lighthouse-viewer
  • Loading branch information
devnook committed Nov 2, 2021
1 parent 66a786d commit 3cae359
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/lib/components/LighthouseViewer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class LighthouseViewer extends BaseStateElement {
renderer.renderReport(lighthouseReport, container);
const features = new ReportUIFeatures(dom);
features.initFeatures(lighthouseReport);
// Force remove dark theme support untill whole of web.dev supports it.
this.varsEl.classList.remove('dark');
};

onStateChanged() {
Expand All @@ -63,6 +65,7 @@ class LighthouseViewer extends BaseStateElement {

firstUpdated() {
this.container = this.querySelector('.lighthouse-viewer');
this.varsEl = this.querySelector('.lh-vars');
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/scss/pages/_measure.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
}
}

.measure-tool {
min-height: 280px;
}

.measure-steps {
--cluster-vertical-alignment: top;

Expand Down
2 changes: 1 addition & 1 deletion src/site/content/en/measure-psi/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ noindex: true
</header>
</section>

<section class="bg-mid-bg">
<section class="bg-mid-bg measure-tool">
<div class="wrapper region" data-size="narrow">
<web-url-chooser-container should-run-psi></web-url-chooser-container>
<web-lighthouse-viewer></web-lighthouse-viewer>
Expand Down

0 comments on commit 3cae359

Please sign in to comment.