Skip to content

Commit

Permalink
fix inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Oct 11, 2023
1 parent 4856288 commit 00fb983
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion public/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ function recommendedLibraries() {
d3: () => import("npm:d3"),
htl: () => import("npm:htl"),
Plot: () => import("npm:@observablehq/plot"),
Inputs: () => import("npm:@observablehq/inputs")
Inputs: () => {
// TODO Observable Inputs needs to include the CSS in the dist folder
// published to npm, and we should replace the __ns__ namespace with
// oi-{hash} in the ES module distribution, somehow.
const inputs = import("npm:@observablehq/inputs");
const link = document.createElement("link");
link.rel = "stylesheet";
link.href = "https://cdn.jsdelivr.net/gh/observablehq/inputs/src/style.css";
document.head.append(link);
return inputs;
}
};
}

Expand Down
12 changes: 6 additions & 6 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -539,21 +539,21 @@ a[href],
background: #ddd;
}

.oi-3a86ea button, .oi-3a86ea input, .oi-3a86ea select, .oi-3a86ea table, .oi-3a86ea textarea {
.__ns__ button, .__ns__ input, .__ns__ select, .__ns__ table, .__ns__ textarea {
color: initial !important;
}

.oi-3a86ea-table thead th {
.__ns__-table thead th {
background: var(--theme-background) !important;
}

.oi-3a86ea-table tr:not(:last-child) td,
.oi-3a86ea-table tr:not(:last-child) th {
.__ns__-table tr:not(:last-child) td,
.__ns__-table tr:not(:last-child) th {
border-bottom: solid 1px var(--theme-foreground-faintest) !important;
}

.oi-3a86ea-table thead tr td,
.oi-3a86ea-table thead tr th {
.__ns__-table thead tr td,
.__ns__-table thead tr th {
border-bottom: solid 1px var(--theme-foreground-fainter) !important;
}

Expand Down

0 comments on commit 00fb983

Please sign in to comment.