Skip to content

Commit bc06199

Browse files
committed
add html repr
1 parent 9c4fab2 commit bc06199

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

neo/rawio/baserawio.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,45 +429,50 @@ def _repr_html_(self):
429429
nb_seg = [self.segment_count(i) for i in range(nb_block)]
430430
html.append(f'<p><strong>nb_segment:</strong> {nb_seg}</p>')
431431

432-
# CSS for tables
432+
# CSS for tables - using only black, white, and gray colors
433433
html.append('''
434434
<style>
435435
table.neo-table {
436436
border-collapse: collapse;
437437
width: 100%;
438438
margin-bottom: 20px;
439439
font-size: 14px;
440+
color: #000;
441+
background-color: #fff;
440442
}
441443
table.neo-table th, table.neo-table td {
442-
border: 1px solid #ddd;
444+
border: 1px solid #ccc;
443445
padding: 8px;
444446
text-align: left;
445447
}
446448
table.neo-table th {
447-
background-color: #f2f2f2;
449+
background-color: #f5f5f5;
448450
color: #333;
449451
}
450452
table.neo-table tr:nth-child(even) {
451-
background-color: #f9f9f9;
453+
background-color: #fafafa;
452454
}
453455
details {
454456
margin-bottom: 15px;
455-
border: 1px solid #ddd;
457+
border: 1px solid #ccc;
456458
border-radius: 4px;
457459
overflow: hidden;
460+
background-color: #fff;
458461
}
459462
summary {
460463
padding: 10px;
461-
background-color: #f2f2f2;
464+
background-color: #f5f5f5;
462465
cursor: pointer;
463466
font-weight: bold;
467+
color: #333;
464468
}
465469
details[open] summary {
466-
border-bottom: 1px solid #ddd;
470+
border-bottom: 1px solid #ccc;
467471
}
468472
.table-container {
469473
padding: 10px;
470474
overflow-x: auto;
475+
background-color: #fff;
471476
}
472477
</style>
473478
''')

0 commit comments

Comments
 (0)