Skip to content

Commit 111e41f

Browse files
authored
Merge pull request #1776 from gnestor/html-table-styles
Update table styles to be consistent with JupyterLab
2 parents c70455b + a0fd16c commit 111e41f

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

notebook/static/notebook/less/renderedhtml.less

+23-9
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,34 @@
5959
table {
6060
margin-left: auto;
6161
margin-right: auto;
62-
border: 1px solid @rendered_html_border_color;
62+
border: none;
6363
border-collapse: collapse;
64+
border-spacing: 0;
65+
color: @rendered_html_border_color;
66+
font-size: 12px;
67+
table-layout: fixed;
6468
}
65-
tr, th, td {
66-
border: 1px solid @rendered_html_border_color;
67-
border-collapse: collapse;
68-
margin: 1em 2em;
69+
thead {
70+
border-bottom: 1px solid @rendered_html_border_color;
71+
vertical-align: bottom;
6972
}
70-
td, th {
71-
text-align: left;
73+
tr, th, td {
74+
text-align: right;
7275
vertical-align: middle;
73-
padding: 4px;
76+
padding: 0.5em 0.5em;
77+
line-height: 1.0;
78+
white-space: nowrap;
79+
max-width: 100px;
80+
text-overflow: ellipsis;
81+
overflow: hidden;
82+
border: none;
83+
}
84+
th {
85+
font-weight: bold;
86+
}
87+
tbody tr:nth-child(odd) {
88+
background: #f5f5f5;
7489
}
75-
th {font-weight: bold;}
7690
* + table {margin-top: 1em;}
7791

7892
p {text-align: left;}

0 commit comments

Comments
 (0)