Skip to content

Commit

Permalink
'--report-content-width'.replace(/-content/g, '')
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jul 30, 2018
1 parent c20d727 commit bbdc667
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lighthouse-core/report/html/renderer/report-ui-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class ReportUIFeatures {
this.headerSticky.style.transform = `translateY(${heightDiff * scrollPct * -1}px)`;
this.headerBackground.style.transform = `translateY(${scrollPct * this.headerOverlap}px)`;
this.lighthouseIcon.style.transform =
`translate3d(calc(var(--report-content-width) / 2),` +
`translate3d(calc(var(--report-width) / 2),` +
` calc(-100% - ${scrollPct * this.headerOverlap * -1}px), 0) scale(${1 - scrollPct})`;
this.lighthouseIcon.style.opacity = Math.max(0, 1 - scrollPct).toString();

Expand Down
5 changes: 2 additions & 3 deletions lighthouse-core/report/html/report-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
--metric-timeline-rule-color: #b3b3b3;
--display-value-gray: hsl(216, 5%, 39%);
--report-width: calc(60 * var(--body-font-size));
--report-content-width: calc(var(--report-width));
--report-header-height: 161px;
--report-header-color: #202124;
--navitem-font-size: var(--body-font-size);
Expand Down Expand Up @@ -635,7 +634,7 @@

.lh-container {
display: flex;
max-width: var(--report-content-width);
max-width: var(--report-width);
word-wrap: break-word;
margin: 0 auto;
}
Expand All @@ -654,7 +653,7 @@
.lh-header-container {
display: block;
margin: 0 auto;
max-width: var(--report-content-width);
max-width: var(--report-width);
position: relative;
word-wrap: break-word;
}
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/report/html/templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
position: absolute;
top: var(--report-header-height);
right: 50%;
transform: translate3d(calc(var(--report-content-width) / 2), -100%, 0);
transform: translate3d(calc(var(--report-width) / 2), -100%, 0);
opacity: 1;
transform-origin: bottom right;
will-change: transform, opacity;
Expand Down

0 comments on commit bbdc667

Please sign in to comment.