Skip to content

Commit

Permalink
Make printing nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
mnot committed Dec 6, 2023
1 parent 8d9f2e4 commit 2d6281c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
36 changes: 31 additions & 5 deletions asset/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,10 @@ th.category a {
}

#key {
position: fixed;
bottom: 0;
width: 80vw;
left: 10vw;
background-color: white;
margin-bottom: 0;
padding: 10px;
border: 1px solid #999;
border-bottom: none;
}

input.select {
Expand Down Expand Up @@ -173,3 +168,34 @@ pre code {
.noFrame {
display: none;
}


@page {
size: A4;
margin: 11mm 17mm 17mm 17mm;
}

@media screen {
#key {
position: fixed;
bottom: 0;
width: 80vw;
left: 10vw;
border-bottom: none;
}
}

@media print {
html, body {
width: 210mm;
height: 297mm;
}

#key {
width: 100%;
}

.noPrint * {
display: none;
}
}
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h1 class='noFrame'>HTTP Caching Tests</h1>
implementation's results, file issues or learn more, see <a
href="https://github.com/http-tests/cache-tests">the repository</a>.</p>

<p class='noFrame'>See also <a href="/spec/rfc9111.html">test results interspersed with the current specification text</a>.</p>
<p class='noFrame noPrint'><span>See also </span><a href="/spec/rfc9111.html">test results interspersed with the current specification text</a>.</p>

<p id="key">
<span class="key-item"><span class="fa" data-kind="pass"></span>passed &nbsp;</span>
Expand All @@ -77,16 +77,16 @@ <h1 class='noFrame'>HTTP Caching Tests</h1>
<span class="key-item"><span class="fa" data-kind="untested"></span>not tested</span>
</p>

<ul id="ToC" class="noFrame">
<ul id="ToC" class="noFrame noPrint">
</ul>

<form method="GET" id="selectForm">

<p class="noFrame"><i>
<p class="noFrame noPrint"><i>
Click on test names for details of what is sent and checked. Hover over failed tests for the reason why they failed.
</i></p>

<p class="noFrame">
<p class="noFrame noPrint">
<a href="#" id="select">Select test results to display</a>
</p>

Expand Down

0 comments on commit 2d6281c

Please sign in to comment.