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

Fix HTML Export where the data-mx-theme is Light not light #7415

Merged
merged 2 commits into from
Dec 23, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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