Skip to content

Commit 82eb9cc

Browse files
committed
report: make gauge font size and positioning dynamic (#9057)
1 parent 99f7bf1 commit 82eb9cc

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lighthouse-core/report/html/report-styles.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,14 +1111,13 @@
11111111

11121112
.lh-gauge__percentage {
11131113
width: 100%;
1114-
height: var(--inset-size);
1114+
height: var(--gauge-circle-size);
11151115
position: absolute;
1116-
border-radius: inherit;
11171116
font-family: var(--monospace-font-family);
1118-
font-size: var(--score-number-font-size);
1119-
line-height: var(--score-number-font-size);
1117+
font-size: calc(var(--gauge-circle-size) * 0.34 + 1.3px);
1118+
line-height: 0;
11201119
text-align: center;
1121-
top: calc(var(--score-container-padding) + var(--gauge-circle-size) / 3);
1120+
top: calc(var(--score-container-padding) + var(--gauge-circle-size) / 2);
11221121
}
11231122

11241123
.lh-category .lh-gauge__percentage {

lighthouse-core/scripts/roll-to-devtools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ cp -r dist/dt-report-resources/ $fe_lh_dir
4949
VERSION=$(node -e "console.log(require('./package.json').version)")
5050
sed -i '' -e "s/Version:.*/Version: $VERSION/g" "$tests_dir"/*-expected.txt
5151

52-
echo "Done. To rebase the test expectations, run: ~/chromium/src/third_party/blink/tools/run_web_tests.py --no-retry 'http/tests/devtools/audits2/*' --reset-results"
52+
echo "Done. To rebase the test expectations, run: yarn --cwd ~/chromium/src/third_party/blink/renderer/devtools test 'http/tests/devtools/audits2/*' --reset-results"

0 commit comments

Comments
 (0)