Skip to content

Commit e5bdc22

Browse files
committed
A few further style tweaks to the HTML report
- File names are not monospaced - Button styling make on/off a little more pronounced - Fix the alignment of the header on the index page
1 parent 0e7cca3 commit e5bdc22

File tree

3 files changed

+38
-256
lines changed

3 files changed

+38
-256
lines changed

coverage/htmlfiles/style.css

+11-122
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
html, body, h1, h2, h3, p, table, td, th { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; }
66

77
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 1em; background: #fff; color: #000; }
8-
98
@media (prefers-color-scheme: dark) { body { background: #1e1e1e; } }
10-
119
@media (prefers-color-scheme: dark) { body { color: #eee; } }
1210

1311
html > body { font-size: 16px; }
@@ -25,259 +23,150 @@ table tr.hidden { display: none !important; }
2523
p#no_rows { display: none; font-size: 1.2em; }
2624

2725
a.nav { text-decoration: none; color: inherit; }
28-
2926
a.nav:hover { text-decoration: underline; color: inherit; }
3027

3128
#header { background: #f8f8f8; width: 100%; border-bottom: 1px solid #eee; }
32-
3329
@media (prefers-color-scheme: dark) { #header { background: black; } }
34-
3530
@media (prefers-color-scheme: dark) { #header { border-color: #333; } }
3631

37-
.indexfile #footer { margin: 1em 3em; }
32+
.indexfile #footer { margin: 1rem 3rem; }
3833

39-
.pyfile #footer { margin: 1em 1em; }
34+
.pyfile #footer { margin: 1rem 1rem; }
4035

4136
#footer .content { padding: 0; color: #666; font-style: italic; }
42-
4337
@media (prefers-color-scheme: dark) { #footer .content { color: #aaa; } }
4438

45-
#index { margin: 1em 0 0 3em; }
39+
#index { margin: 1rem 0 0 3rem; }
4640

47-
#header .content { padding: 1em 3rem; }
41+
#header .content { padding: 1rem 3rem; }
4842

4943
h1 { font-size: 1.25em; display: inline-block; }
5044

5145
#filter_container { float: right; margin: 0 2em 0 0; }
52-
5346
#filter_container input { width: 10em; padding: 0.2em 0.5em; border: 2px solid #ccc; background: #fff; color: #000; }
54-
5547
@media (prefers-color-scheme: dark) { #filter_container input { border-color: #444; } }
56-
5748
@media (prefers-color-scheme: dark) { #filter_container input { background: #1e1e1e; } }
58-
5949
@media (prefers-color-scheme: dark) { #filter_container input { color: #eee; } }
60-
6150
#filter_container input:focus { border-color: #007acc; }
6251

6352
h2.stats { margin-top: .5em; font-size: 1em; }
6453

65-
.stats button { font-family: inherit; font-size: inherit; border: 2px solid; border-radius: .1em; color: inherit; padding: .1em .5em; margin: 0 .1em; cursor: pointer; border-color: #ccc; }
66-
54+
.stats button { font-family: inherit; font-size: inherit; border: 1px solid; border-radius: .2em; color: inherit; padding: .1em .5em; margin: 1px calc(.1em + 1px); cursor: pointer; border-color: #ccc; }
6755
@media (prefers-color-scheme: dark) { .stats button { border-color: #444; } }
68-
6956
.stats button:active, .stats button:focus { outline: 2px dashed #007acc; }
70-
7157
.stats button:active, .stats button:focus { outline: 2px dashed #007acc; }
72-
7358
.stats button.run { background: #eeffee; }
74-
7559
@media (prefers-color-scheme: dark) { .stats button.run { background: #373d29; } }
76-
77-
.stats button.run.show_run { background: #dfd; border-color: #00dd00; }
78-
60+
.stats button.run.show_run { background: #dfd; border: 2px solid #00dd00; margin: 0 .1em; }
7961
@media (prefers-color-scheme: dark) { .stats button.run.show_run { background: #373d29; } }
80-
8162
.stats button.mis { background: #ffeeee; }
82-
8363
@media (prefers-color-scheme: dark) { .stats button.mis { background: #4b1818; } }
84-
85-
.stats button.mis.show_mis { background: #fdd; border-color: #ff0000; }
86-
64+
.stats button.mis.show_mis { background: #fdd; border: 2px solid #ff0000; margin: 0 .1em; }
8765
@media (prefers-color-scheme: dark) { .stats button.mis.show_mis { background: #4b1818; } }
88-
8966
.stats button.exc { background: #f7f7f7; }
90-
9167
@media (prefers-color-scheme: dark) { .stats button.exc { background: #333; } }
92-
93-
.stats button.exc.show_exc { background: #eee; border-color: #808080; }
94-
68+
.stats button.exc.show_exc { background: #eee; border: 2px solid #808080; margin: 0 .1em; }
9569
@media (prefers-color-scheme: dark) { .stats button.exc.show_exc { background: #333; } }
96-
9770
.stats button.par { background: #ffffd5; }
98-
9971
@media (prefers-color-scheme: dark) { .stats button.par { background: #650; } }
100-
101-
.stats button.par.show_par { background: #ffa; border-color: #dddd00; }
102-
72+
.stats button.par.show_par { background: #ffa; border: 2px solid #dddd00; margin: 0 .1em; }
10373
@media (prefers-color-scheme: dark) { .stats button.par.show_par { background: #650; } }
10474

105-
.help_panel, #source p .annotate.long { display: none; position: absolute; z-index: 999; background: #ffffcc; border: 1px solid #888; border-radius: .2em; color: #333; padding: .25em .5em; }
75+
#source p .annotate.long, .help_panel { display: none; position: absolute; z-index: 999; background: #ffffcc; border: 1px solid #888; border-radius: .2em; color: #333; padding: .25em .5em; }
10676

10777
#source p .annotate.long { white-space: normal; float: right; top: 1.75em; right: 1em; height: auto; }
10878

10979
#keyboard_icon { float: right; margin: 5px; cursor: pointer; }
11080

11181
.help_panel { padding: .5em; border: 1px solid #883; }
112-
11382
.help_panel .legend { font-style: italic; margin-bottom: 1em; }
114-
11583
.indexfile .help_panel { width: 20em; min-height: 4em; }
116-
11784
.pyfile .help_panel { width: 16em; min-height: 8em; }
11885

11986
#panel_icon { float: right; cursor: pointer; }
12087

12188
.keyhelp { margin: .75em; }
122-
12389
.keyhelp .key { border: 1px solid black; border-color: #888 #333 #333 #888; padding: .1em .35em; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: bold; background: #eee; }
12490

12591
#source { padding: 1em 0 1em 3rem; font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
126-
12792
#source p { position: relative; white-space: pre; }
128-
12993
#source p * { box-sizing: border-box; }
130-
13194
#source p .n { float: left; text-align: right; width: 3rem; box-sizing: border-box; margin-left: -3rem; padding-right: 1em; color: #999; }
132-
13395
@media (prefers-color-scheme: dark) { #source p .n { color: #777; } }
134-
13596
#source p .n a { text-decoration: none; color: #999; }
136-
13797
@media (prefers-color-scheme: dark) { #source p .n a { color: #777; } }
138-
13998
#source p .n a:hover { text-decoration: underline; color: #999; }
140-
14199
@media (prefers-color-scheme: dark) { #source p .n a:hover { color: #777; } }
142-
143100
#source p.highlight .n { background: #ffdd00; }
144-
145101
#source p .t { display: inline-block; width: 100%; box-sizing: border-box; margin-left: -.5em; padding-left: 0.3em; border-left: 0.2em solid #fff; }
146-
147102
@media (prefers-color-scheme: dark) { #source p .t { border-color: #1e1e1e; } }
148-
149103
#source p .t:hover { background: #f2f2f2; }
150-
151104
@media (prefers-color-scheme: dark) { #source p .t:hover { background: #282828; } }
152-
153105
#source p .t:hover ~ .r .annotate.long { display: block; }
154-
155106
#source p .t .com { color: #008000; font-style: italic; line-height: 1px; }
156-
157107
@media (prefers-color-scheme: dark) { #source p .t .com { color: #6A9955; } }
158-
159108
#source p .t .key { font-weight: bold; line-height: 1px; }
160-
161109
#source p .t .str { color: #0451A5; }
162-
163110
@media (prefers-color-scheme: dark) { #source p .t .str { color: #9CDCFE; } }
164-
165111
#source p.mis .t { border-left: 0.2em solid #ff0000; }
166-
167112
#source p.mis.show_mis .t { background: #fdd; }
168-
169113
@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t { background: #4b1818; } }
170-
171114
#source p.mis.show_mis .t:hover { background: #f2d2d2; }
172-
173115
@media (prefers-color-scheme: dark) { #source p.mis.show_mis .t:hover { background: #532323; } }
174-
175116
#source p.run .t { border-left: 0.2em solid #00dd00; }
176-
177117
#source p.run.show_run .t { background: #dfd; }
178-
179118
@media (prefers-color-scheme: dark) { #source p.run.show_run .t { background: #373d29; } }
180-
181119
#source p.run.show_run .t:hover { background: #d2f2d2; }
182-
183120
@media (prefers-color-scheme: dark) { #source p.run.show_run .t:hover { background: #404633; } }
184-
185121
#source p.exc .t { border-left: 0.2em solid #808080; }
186-
187122
#source p.exc.show_exc .t { background: #eee; }
188-
189123
@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t { background: #333; } }
190-
191124
#source p.exc.show_exc .t:hover { background: #e2e2e2; }
192-
193125
@media (prefers-color-scheme: dark) { #source p.exc.show_exc .t:hover { background: #3c3c3c; } }
194-
195126
#source p.par .t { border-left: 0.2em solid #dddd00; }
196-
197127
#source p.par.show_par .t { background: #ffa; }
198-
199128
@media (prefers-color-scheme: dark) { #source p.par.show_par .t { background: #650; } }
200-
201129
#source p.par.show_par .t:hover { background: #f2f2a2; }
202-
203130
@media (prefers-color-scheme: dark) { #source p.par.show_par .t:hover { background: #6d5d0c; } }
204-
205131
#source p .r { position: absolute; top: 0; right: 2.5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; }
206-
207132
#source p .annotate { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; color: #666; padding-right: .5em; }
208-
209133
@media (prefers-color-scheme: dark) { #source p .annotate { color: #ddd; } }
210-
211134
#source p .annotate.short:hover ~ .long { display: block; }
212-
213135
#source p .annotate.long { width: 30em; right: 2.5em; }
214-
215136
#source p input { display: none; }
216-
217137
#source p input ~ .r label.ctx { cursor: pointer; border-radius: .25em; }
218-
219138
#source p input ~ .r label.ctx::before { content: "▶ "; }
220-
221139
#source p input ~ .r label.ctx:hover { background: #d5f7ff; color: #666; }
222-
223140
#source p input:checked ~ .r label.ctx { background: #aaeeff; color: #666; border-radius: .75em .75em 0 0; padding: 0 .5em; margin: -.25em 0; }
224-
225141
#source p input:checked ~ .r label.ctx::before { content: "▼ "; }
226-
227142
#source p input:checked ~ .ctxs { padding: .25em .5em; overflow-y: scroll; max-height: 10.5em; }
228-
229143
#source p label.ctx { color: #999; display: inline-block; padding: 0 .5em; font-size: .8333em; }
230-
231144
@media (prefers-color-scheme: dark) { #source p label.ctx { color: #777; } }
232-
233145
#source p .ctxs { display: block; max-height: 0; overflow-y: hidden; transition: all .2s; padding: 0 .5em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; white-space: nowrap; background: #aaeeff; border-radius: .25em; margin-right: 1.75em; }
234-
235146
#source p .ctxs span { display: block; text-align: right; }
236147

237-
#index { font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.875em; }
238-
148+
#index { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-size: 0.875em; }
239149
#index td, #index th { text-align: right; width: 5em; padding: .25em .5em; border-bottom: 1px solid #eee; }
240-
241150
@media (prefers-color-scheme: dark) { #index td, #index th { border-color: #333; } }
242-
243151
#index td.left, #index th.left { padding-left: 0; }
244-
245152
#index td.right, #index th.right { padding-right: 0; }
246-
247153
#index td.name, #index th.name { text-align: left; width: auto; }
248-
249154
#index th { font-style: italic; color: #333; cursor: pointer; }
250-
251155
@media (prefers-color-scheme: dark) { #index th { color: #ddd; } }
252-
253156
#index th:hover { background: #eee; }
254-
255157
@media (prefers-color-scheme: dark) { #index th:hover { background: #333; } }
256-
257158
#index th.headerSortDown, #index th.headerSortUp { white-space: nowrap; background: #eee; }
258-
259159
@media (prefers-color-scheme: dark) { #index th.headerSortDown, #index th.headerSortUp { background: #333; } }
260-
261160
#index th.headerSortDown:after { content: " ↓"; }
262-
263161
#index th.headerSortUp:after { content: " ↑"; }
264-
265162
#index td.name a { text-decoration: none; color: inherit; }
266-
267163
#index tr.total td, #index tr.total_dynamic td { font-weight: bold; border-top: 1px solid #ccc; border-bottom: none; }
268-
269164
#index tr.file:hover { background: #eee; }
270-
271165
@media (prefers-color-scheme: dark) { #index tr.file:hover { background: #333; } }
272-
273166
#index tr.file:hover td.name { text-decoration: underline; color: inherit; }
274167

275168
#scroll_marker { position: fixed; right: 0; top: 0; width: 16px; height: 100%; background: #fff; border-left: 1px solid #eee; will-change: transform; }
276-
277169
@media (prefers-color-scheme: dark) { #scroll_marker { background: #1e1e1e; } }
278-
279170
@media (prefers-color-scheme: dark) { #scroll_marker { border-color: #333; } }
280-
281171
#scroll_marker .marker { background: #ccc; position: absolute; min-height: 3px; width: 100%; }
282-
283172
@media (prefers-color-scheme: dark) { #scroll_marker .marker { background: #444; } }

coverage/htmlfiles/style.scss

+16-12
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ a.nav {
164164
}
165165

166166
.indexfile #footer {
167-
margin: 1em 3em;
167+
margin: 1rem 3rem;
168168
}
169169

170170
.pyfile #footer {
171-
margin: 1em 1em;
171+
margin: 1rem 1rem;
172172
}
173173

174174
#footer .content {
@@ -179,12 +179,12 @@ a.nav {
179179
}
180180

181181
#index {
182-
margin: 1em 0 0 3em;
182+
margin: 1rem 0 0 3rem;
183183
}
184184

185185
// Header styles
186186
#header .content {
187-
padding: 1em $left-gutter;
187+
padding: 1rem $left-gutter;
188188
}
189189

190190
h1 {
@@ -218,11 +218,11 @@ h2.stats {
218218
.stats button {
219219
font-family: inherit;
220220
font-size: inherit;
221-
border: 2px solid;
222-
border-radius: .1em;
221+
border: 1px solid;
222+
border-radius: .2em;
223223
color: inherit;
224224
padding: .1em .5em;
225-
margin: 0 .1em;
225+
margin: 1px calc(.1em + 1px);
226226
cursor: pointer;
227227
border-color: $light-gray3;
228228
@include border-color-dark($dark-gray3);
@@ -236,7 +236,8 @@ h2.stats {
236236
&.show_run {
237237
background: $light-run-bg;
238238
@include background-dark($dark-run-bg);
239-
border-color: $run-color;
239+
border: 2px solid $run-color;
240+
margin: 0 .1em;
240241
}
241242
}
242243
&.mis {
@@ -245,7 +246,8 @@ h2.stats {
245246
&.show_mis {
246247
background: $light-mis-bg;
247248
@include background-dark($dark-mis-bg);
248-
border-color: $mis-color;
249+
border: 2px solid $mis-color;
250+
margin: 0 .1em;
249251
}
250252
}
251253
&.exc {
@@ -254,7 +256,8 @@ h2.stats {
254256
&.show_exc {
255257
background: $light-exc-bg;
256258
@include background-dark($dark-exc-bg);
257-
border-color: $exc-color;
259+
border: 2px solid $exc-color;
260+
margin: 0 .1em;
258261
}
259262
}
260263
&.par {
@@ -263,7 +266,8 @@ h2.stats {
263266
&.show_par {
264267
background: $light-par-bg;
265268
@include background-dark($dark-par-bg);
266-
border-color: $par-color;
269+
border: 2px solid $par-color;
270+
margin: 0 .1em;
267271
}
268272
}
269273
}
@@ -569,7 +573,7 @@ $context-panel-color: #aaeeff;
569573

570574
// index styles
571575
#index {
572-
font-family: $font-code;
576+
font-family: $font-normal;
573577
font-size: 0.875em;
574578

575579
td, th {

0 commit comments

Comments
 (0)