Skip to content

Commit

Permalink
HTML Reporter: Use a fixed header with scrollable tests
Browse files Browse the repository at this point in the history
The QUnit header and status summary are now fixed at the top using flexbox,
with the tests scrollable within their own area.

If the browser doesn't support flexbox, or if the window is relatively short,
then we render it the same as before with the header scrolling off the screen.

This only applies to the `#qunit` element. The fixture and body element remain
outside and unaffected.

Closes #1513.
  • Loading branch information
BryanCrotaz authored Nov 30, 2020
1 parent 425b03c commit 62fc726
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/qunit.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,33 @@
}


/** Fixed headers with scrollable tests */

@supports (display: flex) or (display: -webkit-box) {
@media (min-height: 500px) {
#qunit {
position: fixed;
left: 0px;
right: 0px;
top: 0px;
bottom: 0px;
padding: 8px;
display: -webkit-box;
display: flex;
flex-direction: column;
}

#qunit-tests {
overflow: scroll;
}

#qunit-banner {
flex: 5px 0 0;
}
}
}


/** Header (excluding toolbar) */

#qunit-header {
Expand Down

0 comments on commit 62fc726

Please sign in to comment.