Skip to content

Commit

Permalink
added font declaration for Chromatic
Browse files Browse the repository at this point in the history
  • Loading branch information
Francis Thibault committed Oct 5, 2023
1 parent c7ce183 commit 2fd73f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 91 deletions.
87 changes: 0 additions & 87 deletions .storybook/preview-head.html

This file was deleted.

10 changes: 6 additions & 4 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import { withBackgroundMatchingColorScheme, withCenteredCanvas, withDocsContaine
import { Code, Highlight } from "@stories/mdx";
import { Themes } from "./styles/themes";

// if (isChromatic) {
// // Custom font makes chromatic inconsistent and cause "false positive". View https://www.chromatic.com/docs/resource-loading#loading-custom-fonts.
// import("@css/font/index.css");
// }
if (!isChromatic) {
// Custom font makes chromatic inconsistent and cause "false positive". View https://www.chromatic.com/docs/resource-loading#loading-custom-fonts.
import("@css/font/index.css");
} else {
import("./styles/chromatic.css");
}

export const parameters = {
options: {
Expand Down
5 changes: 5 additions & 0 deletions .storybook/styles/chromatic.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*,
*::before,
*::after {
font-family: Arial;
}

0 comments on commit 2fd73f8

Please sign in to comment.