Skip to content

Commit

Permalink
Merge pull request #617 from washingtonpost/boop2
Browse files Browse the repository at this point in the history
fix: remove global styles from wpds-tokens
  • Loading branch information
carlyn-c authored Apr 9, 2024
2 parents 49e35a1 + aed4a70 commit 494ec35
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions ui/tokens/scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
import React from "react";
import { renderToString } from "react-dom/server.js";
import { getCssText, globalStyles, darkModeGlobalStyles, darkTheme } from "@washingtonpost/wpds-theme";
import { getCssText, darkTheme } from "@washingtonpost/wpds-theme";
import fs from "fs";

// eslint-disable-next-line testing-library/render-result-naming-convention
const css = renderToString(
React.createElement("style", {
dangerouslySetInnerHTML: { __html: getCssText() }
})
React.createElement("style", {
dangerouslySetInnerHTML: { __html: getCssText() },
})
);

// Needed in order for the react render (with stitches) to generate the dark color tokens
// eslint-disable-next-line testing-library/render-result-naming-convention
const div = renderToString(
React.createElement("div", {
className: darkTheme
})
React.createElement("div", {
className: darkTheme,
})
);

globalStyles();
darkModeGlobalStyles();

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const template = `
${css}
Expand Down

0 comments on commit 494ec35

Please sign in to comment.