Skip to content

Commit 9cb940c

Browse files
committed
Merge branch 'jakehwll/implement-storybook' into jakehwll/implement-chromatic
2 parents 73cf031 + 32dd1bf commit 9cb940c

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ pnpm-debug.log
1313
packages/*/node_modules/
1414

1515
# Storybook
16-
storybook-static/debug-storybook.log
16+
storybook-static/
17+
debug-storybook.log

.storybook/preview.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ if (
4242
document.head.appendChild(link);
4343
}
4444

45+
// VS Code injects --vscode-font-family at runtime, but the upstream
46+
// vscode-elements theme data omits it. Set a static default so
47+
// Storybook (and Chromatic) renders with a predictable sans-serif
48+
// stack instead of falling back to the browser default (Times).
49+
const VSCODE_FONT_FAMILY =
50+
'"Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif';
51+
4552
const preview: Preview = {
4653
parameters: {
4754
layout: "centered",
@@ -68,6 +75,7 @@ const preview: Preview = {
6875

6976
useEffect(() => {
7077
const root = document.documentElement.style;
78+
root.setProperty("--vscode-font-family", VSCODE_FONT_FAMILY);
7179

7280
// Apply CSS custom properties to the document root
7381
selectedTheme.forEach(([property, value]) => {

0 commit comments

Comments
 (0)