From d411f0ac43aa210098d5420fa4f6f0393959da0a Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Tue, 20 Sep 2016 15:48:32 -0700 Subject: [PATCH 1/2] Update table styles to be consistent with JupyterLab --- .../static/notebook/less/renderedhtml.less | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/notebook/static/notebook/less/renderedhtml.less b/notebook/static/notebook/less/renderedhtml.less index b0ef7bf89..b82e66a3c 100644 --- a/notebook/static/notebook/less/renderedhtml.less +++ b/notebook/static/notebook/less/renderedhtml.less @@ -59,20 +59,34 @@ table { margin-left: auto; margin-right: auto; - border: 1px solid @rendered_html_border_color; + border: none; border-collapse: collapse; + border-spacing: 0; + color: @rendered_html_border_color; + font-size: 12px; + table-layout: fixed; } - tr, th, td { - border: 1px solid @rendered_html_border_color; - border-collapse: collapse; - margin: 1em 2em; + thead { + border-bottom: 2px solid @rendered_html_border_color; + vertical-align: bottom; } - td, th { - text-align: left; + tr, th, td { + text-align: right; vertical-align: middle; - padding: 4px; + padding: 0.5em 0.5em; + line-height: 1.0; + white-space: nowrap; + max-width: 100px; + text-overflow: ellipsis; + overflow: hidden; + border: none; + } + th { + font-weight: bold; + } + tbody tr:nth-child(odd) { + background: #f5f5f5; } - th {font-weight: bold;} * + table {margin-top: 1em;} p {text-align: left;} From a0fd16cc6fc98ae303c514a758560dc58c03fd80 Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Tue, 20 Sep 2016 21:47:20 -0700 Subject: [PATCH 2/2] `border-width: 1px` --- notebook/static/notebook/less/renderedhtml.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/static/notebook/less/renderedhtml.less b/notebook/static/notebook/less/renderedhtml.less index b82e66a3c..e48e5ef71 100644 --- a/notebook/static/notebook/less/renderedhtml.less +++ b/notebook/static/notebook/less/renderedhtml.less @@ -67,7 +67,7 @@ table-layout: fixed; } thead { - border-bottom: 2px solid @rendered_html_border_color; + border-bottom: 1px solid @rendered_html_border_color; vertical-align: bottom; } tr, th, td {