Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
Tweak styles in HTML reports
Browse files Browse the repository at this point in the history
  • Loading branch information
vfaronov committed Aug 3, 2016
1 parent 8326f5a commit 84495d1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Changed
you now have to use different options to tcpick/tcpflow (consult the manual).
- `Text reports`_ no longer show request/response numbers.
If you parse these reports, you may need to adjust.
- Styles in HTML reports have been tweaked to make them more readable.

.. _Text reports: http://httpolice.readthedocs.io/en/stable/reports.html
.. _tcpick and tcpflow input:
Expand Down
33 changes: 28 additions & 5 deletions httpolice/reports/html.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
****************************************************************/

body {
background: white;
background: whitesmoke;
color: black;
font-family: sans-serif;
quotes: '“' '”';
Expand All @@ -16,12 +16,13 @@ body {

@media screen { /* Print margins are OK already. */
body {
margin: 3em;
margin: 2em;
}
}

h1 {
font-size: x-large;
margin-bottom: 0;
}

h2, h3 {
Expand Down Expand Up @@ -80,11 +81,29 @@ button {
* Request and response data
****************************************************************/

div.message-display {
div.exchange {
background: white;
margin-top: 3em;
}

@media screen {
div.exchange {
/* Bottom padding is smaller
* because there is an invisible ``hr`` there. */
padding: 2em 2em 1.5em 2em;
border: solid thin darkgray;
}
}

div.message-display {
max-width: 55em;
}

.exchange > section:not(:first-child) div.message-display {
/* Spacing between messages within one exchange. */
margin-top: 2em;
}

p.message-remark {
margin: 0 1em 0.5em 0;
color: gray;
Expand Down Expand Up @@ -120,7 +139,7 @@ div.body-display, div.trailer {
border: thin dashed;
padding: 0.3em 0.5em;
margin: 0;
color: dimgray;
color: darkgray;
}

.body-display pre {
Expand All @@ -137,11 +156,14 @@ div.body-display, div.trailer {
****************************************************************/

div.complaints {
margin-top: 2em;
padding-left: 1em;
border-left: thin solid lightgray;
}

.exchange > section:not(:first-child) div.complaints {
margin-top: 2em;
}

div.notice {
max-width: 55em;
page-break-inside: avoid;
Expand Down Expand Up @@ -232,6 +254,7 @@ div.options {
margin-top: 0.3em;
padding: 0.1em 1em;
background: lavender;
border: solid thin darkgray;
white-space: nowrap;
}

Expand Down

0 comments on commit 84495d1

Please sign in to comment.