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
commit41bff023af65451c4479e7a661fb571c028fd516 (patch)
treed2aa8152d6f15aa496242d4a4182caa742757970 /coverage/htmlfiles
parent51b6d237bbaf7fe19c073d80277b6b34187cca3e (diff)
downloadpython-coveragepy-git-41bff023af65451c4479e7a661fb571c028fd516.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 ad7969db..fb8e131e 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 4f43b591..ea261e93 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 {