Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report(redesign): adjust score scale to match new design #8590

Merged
merged 2 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -853,18 +855,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