Skip to content

Commit

Permalink
fix: fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
te6-in committed Nov 28, 2024
1 parent 6ffab79 commit 0bbbe08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
}

body {
display: "flex";
flex-direction: "column";
padding: "0 20px";
font-family: '-apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji';
font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
"Noto Color Emoji";
}

table {
Expand Down
4 changes: 2 additions & 2 deletions docs/stories/components/decorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const SeedThemeDecorator: Decorator = (Story, ctx) => {
document.documentElement.setAttribute("data-seed", isDarkTheme ? "dark-only" : "light-only");
document.documentElement.setAttribute("data-seed-scale-color", isDarkTheme ? "dark" : "light");

document.documentElement.style.removeProperty("--base-font-size");

if (ctx.name.includes(STORY_PREFIX_FONT_SCALING)) {
const fontScaleMap = {
"Extra Small": "14px",
Expand All @@ -30,8 +32,6 @@ export const SeedThemeDecorator: Decorator = (Story, ctx) => {
.replace(STORY_PREFIX_FONT_SCALING, "")
.trim() as keyof typeof fontScaleMap;

document.documentElement.style.fontSize = fontScaleMap[fontScale];

document.documentElement.style.setProperty("--base-font-size", fontScaleMap[fontScale]);
}
}, [ctx.name]);
Expand Down

0 comments on commit 0bbbe08

Please sign in to comment.