|
145 | 145 | --sparkline-height: 5px;
|
146 | 146 | --stackpack-padding-horizontal: 10px;
|
147 | 147 | --sticky-header-background-color: var(--report-background-color);
|
| 148 | + --sticky-header-buffer: calc(var(--topbar-height) + var(--sticky-header-height)); |
148 | 149 | --sticky-header-height: calc(var(--gauge-circle-size-sm) + var(--score-container-padding) * 2);
|
149 | 150 | --table-higlight-background-color: hsla(210, 17%, 77%, 0.1);
|
150 | 151 | --tools-icon-color: var(--color-gray-600);
|
|
284 | 285 | .lh-container:not(.lh-topbar + .lh-container) {
|
285 | 286 | --topbar-height: 0;
|
286 | 287 | --sticky-header-height: 0;
|
| 288 | + --sticky-header-buffer: 0; |
287 | 289 | }
|
288 | 290 |
|
289 | 291 | .lh-devtools.lh-root {
|
|
296 | 298 | .lh-devtools .lh-container {
|
297 | 299 | overflow-y: scroll;
|
298 | 300 | height: calc(100% - var(--topbar-height));
|
| 301 | + /** The .lh-container is the scroll parent in DevTools so we exclude the topbar from the sticky header buffer. */ |
| 302 | + --sticky-header-buffer: calc(var(--sticky-header-height)); |
299 | 303 | }
|
300 | 304 | @media print {
|
301 | 305 | .lh-devtools .lh-container {
|
|
1414 | 1418 | max-width: var(--report-content-max-width);
|
1415 | 1419 | margin: 0 auto;
|
1416 | 1420 |
|
1417 |
| - --topbar-plus-sticky-header: calc(var(--topbar-height) + var(--sticky-header-height)); |
1418 |
| - scroll-margin-top: var(--topbar-plus-sticky-header); |
| 1421 | + scroll-margin-top: var(--sticky-header-buffer); |
1419 | 1422 |
|
1420 | 1423 | /* Faster recalc style & layout of the report. https://web.dev/content-visibility/ */
|
1421 | 1424 | content-visibility: auto;
|
|
1510 | 1513 |
|
1511 | 1514 | .lh-table thead th {
|
1512 | 1515 | position: sticky;
|
1513 |
| - top: calc(var(--topbar-plus-sticky-header) + 1em); |
| 1516 | + top: calc(var(--sticky-header-buffer) + 1em); |
1514 | 1517 | z-index: 1;
|
1515 | 1518 | background-color: var(--report-background-color);
|
1516 | 1519 | border-bottom: 1px solid var(--report-border-color-secondary);
|
|
0 commit comments