summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-02-03 06:50:09 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-02-03 06:50:09 -0500
commitcc94a7dd39c02c4dfb40449cda66063ba9ec72f4 (patch)
treee71fb5d0696bc14a7cebbd6c8aab68accc5d270c /coverage/htmlfiles
parent0a792695acfa3a0c2a150d2164317a71563d8e82 (diff)
downloadpython-coveragepy-cc94a7dd39c02c4dfb40449cda66063ba9ec72f4.tar.gz
A way to show much longer explanations about lines in the HTML report.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r--coverage/htmlfiles/pyfile.html2
-rw-r--r--coverage/htmlfiles/style.css22
2 files changed, 22 insertions, 2 deletions
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index ad7969d..fb8e131 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -77,7 +77,7 @@
</td>
<td class="text">
{% for line in lines %}
- <p id="t{{line.number}}" class="{{line.class}}">{% if line.annotate %}<span class="annotate" title="{{line.annotate_title}}">{{line.annotate}}</span>{% endif %}{{line.html}}<span class="strut">&nbsp;</span></p>
+ <p id="t{{line.number}}" class="{{line.class}}">{% if line.annotate %}<span class="annotate short">{{line.annotate}}</span><span class="annotate long">{{line.annotate_long}}</span>{% endif %}{{line.html}}<span class="strut">&nbsp;</span></p>
{% endfor %}
</td>
</tr>
diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css
index 4f43b59..ea261e9 100644
--- a/coverage/htmlfiles/style.css
+++ b/coverage/htmlfiles/style.css
@@ -160,7 +160,7 @@ h2.stats {
.help_panel {
position: absolute;
- background: #ffc;
+ background: #ffffcc;
padding: .5em;
border: 1px solid #883;
display: none;
@@ -227,6 +227,7 @@ td.text {
padding: 0 0 0 .5em;
border-left: 2px solid #ffffff;
white-space: pre;
+ position: relative;
}
.text p.mis {
@@ -259,6 +260,25 @@ td.text {
.text p.hide_par span.annotate {
display: none;
}
+.text span.annotate.long {
+ display: none;
+ }
+.text p:hover span.annotate.long {
+ display: block;
+ max-width: 50%;
+ white-space: normal;
+ float: right;
+ position: absolute;
+ top: 1.5em;
+ right: 0;
+ width: 30em;
+ height: auto;
+ background: #ffffcc;
+ border: 1px solid #888;
+ padding: .25em .5em;
+ z-index: 999;
+
+ }
/* Syntax coloring */
.text .com {