@@ -4,6 +4,7 @@ import type {
44import { OutputLoader } from './outputLoader' ;
55const aq = require ( 'arquero' ) ;
66const inputs = require ( '@observablehq/inputs' ) ;
7+ import './style.css' ;
78
89/**
910 * Notebook cell output render info.
@@ -32,9 +33,6 @@ export function render(output: IRenderInfo) {
3233 break ;
3334 }
3435
35- // add data table view styles
36- addStyles ( document ) ;
37-
3836 if ( Array . isArray ( data ) ) {
3937 // create data table view
4038 const table = inputs . table ( data , {
@@ -85,41 +83,3 @@ if (module.hot) {
8583
8684 return 0 ;
8785}
88-
89- function addStyles ( document : HTMLDocument ) : HTMLStyleElement {
90- const styles : HTMLStyleElement = document . createElement ( 'style' ) ;
91- document . head . appendChild ( styles ) ;
92- styles . textContent = `
93- .data-table {
94- max-width: 100%;
95- background-color: var(--vscode-editor-background);
96- border: 1px solid var(--vscode-panel-border);
97- }
98-
99- .data-table form {
100- margin: 0px !important;
101- }
102-
103- tbody tr:hover {
104- box-shadow: inset 0 0 1500px 100px rgba(255, 255, 255, 0.1);
105- }
106-
107- .vscode-light tbody tr:hover {
108- box-shadow: inset 0 0 1500px 100px rgba(0, 0, 0, 0.1);
109- }
110-
111- .data-table form table thead th {
112- background-color: var(--vscode-editor-background) !important;
113- }
114-
115- thead th {
116- box-shadow: 0 1px 0 var(--vscode-panel-border) !important;
117- }
118-
119- th {
120- text-align: left !important;
121- }
122- ` ;
123-
124- return styles ;
125- }
0 commit comments