Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix exporting from nightly where the data-mx-theme is Light not `li…
Browse files Browse the repository at this point in the history
…ght` (#7416)
  • Loading branch information
t3chguy authored Dec 20, 2021
1 parent 3dde039 commit d10ac7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/exportUtils/exportCSS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function mutateCssText(css: string): string {
const getExportCSS = async (usedClasses: Set<string>): Promise<string> => {
// only include bundle.css and the data-mx-theme=light styling
const stylesheets = Array.from(document.styleSheets).filter(s => {
return s.href?.endsWith("bundle.css") || (s.ownerNode as HTMLStyleElement).dataset.mxTheme === "light";
return s.href?.endsWith("bundle.css") ||
(s.ownerNode as HTMLStyleElement).dataset.mxTheme.toLowerCase() === "light";
});

let css = "";
Expand Down

0 comments on commit d10ac7c

Please sign in to comment.