Skip to content

Commit

Permalink
report(redesign): score scale tweaks (#8590)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored and paulirish committed Apr 25, 2019
1 parent f63c523 commit 41879ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions lighthouse-core/report/html/report-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
--score-title-font-size: 20px;
--score-title-line-height-big: 36px;
--score-title-line-height: 26px;
--scorescale-height: 6px;
--scorescale-width: 18px;
--section-padding: 40px;
--topbar-bg: var(--color-black-100);
--topbar-height: 36px;
Expand Down Expand Up @@ -857,18 +859,20 @@
}

.lh-scorescale-range {
display: flex;
align-items: center;
margin: 0 12px;
font-family: var(--monospace-font-family);
white-space: nowrap;
}

.lh-scorescale-range::before {
content: '';
width: var(--body-font-size);
height: calc(var(--body-font-size) * .50);
width: var(--scorescale-width);
height: var(--scorescale-height);
border-radius: 10px;
display: inline-block;
margin: 0 5px;
display: block;
margin-right: 10px;
}

.lh-scorescale-range--pass::before {
Expand Down
6 changes: 3 additions & 3 deletions lighthouse-core/report/html/templates.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
<!-- Lighthouse score scale -->
<template id="tmpl-lh-scorescale">
<div class="lh-scorescale">
<span class="lh-scorescale-range lh-scorescale-range--fail">0-49</span>
<span class="lh-scorescale-range lh-scorescale-range--average">50-89</span>
<span class="lh-scorescale-range lh-scorescale-range--pass">90-100</span>
<span class="lh-scorescale-range lh-scorescale-range--fail">0&ndash;49</span>
<span class="lh-scorescale-range lh-scorescale-range--average">50&ndash;89</span>
<span class="lh-scorescale-range lh-scorescale-range--pass">90&ndash;100</span>
</div>
</template>

Expand Down

0 comments on commit 41879ad

Please sign in to comment.