File tree Expand file tree Collapse file tree 2 files changed +29
-10
lines changed
Expand file tree Collapse file tree 2 files changed +29
-10
lines changed Original file line number Diff line number Diff line change 11import type {
2- RendererContext ,
3- OutputItem
4- }
5- from 'vscode-notebook-renderer' ;
6- import { OutputLoader } from './outputLoader' ;
2+ OutputItem , RendererContext
3+ } from 'vscode-notebook-renderer' ;
4+ import { OutputLoader } from './outputLoader' ;
75const aq = require ( 'arquero' ) ;
86const inputs = require ( '@observablehq/inputs' ) ;
97
@@ -51,7 +49,7 @@ export function render(output: IRenderInfo) {
5149 }
5250 else {
5351 // output text in pre/code tags
54- output . container . innerHTML = `<pre
52+ output . container . innerHTML = `<pre
5553 style="max-height: 300px; white-space: pre-wrap; tab-size: 2; overflow: auto;">
5654 <code style="display: block; white-space: pre-wrap;">${ data } </code>
5755 </pre>` ;
@@ -77,7 +75,7 @@ if (module.hot) {
7775
7876 if ( typeof data . size === 'number' ) {
7977 // map or set
80- return data . size ;
78+ return data . size ;
8179 }
8280
8381 if ( typeof data . numRows === 'function' ) {
@@ -109,11 +107,20 @@ function addStyles(document: HTMLDocument): HTMLStyleElement {
109107 thead th {
110108 box-shadow: 0 1px 0 var(--vscode-panel-border) !important;
111109 }
112-
110+
111+ th, td {
112+ border: 1px solid var(--vscode-panel-border) !important;
113+ }
114+
115+ th:first-child,
116+ td:first-child {
117+ border-left: none !important;
118+ }
119+
113120 th {
114- text-align: left !important;
121+ border-top: none !important;
115122 }
116123 ` ;
117-
124+
118125 return styles ;
119126}
Original file line number Diff line number Diff line change @@ -19,3 +19,15 @@ thead th {
1919th {
2020 text-align : left !important ;
2121}
22+
23+ th , td {
24+ border : 1px solid var (--vscode-panel-border ) !important ;
25+ }
26+
27+ th : first-child ,
28+ td : first-child {
29+ border-left : none !important ;
30+ }
31+ th {
32+ border-top : none !important ;
33+ }
You can’t perform that action at this time.
0 commit comments