Commit 2b47ff15 authored by chechunchi's avatar chechunchi

fix build deck styles

parent 5a47c255
Pipeline #28646 passed with stages
in 12 minutes and 1 second
......@@ -67,6 +67,12 @@ const matConfigWithUnit = Object.entries(_matConfigWithUnit).map(
([k, [value, unit]]) => [k, pxTransform(value, unit) as [number, UNIT]],
) satisfies CSSConfig;
export function setCssProperties() {
toCssProperties(matConfigWithUnit).forEach(([k, v]) => {
document.body.style.setProperty(k, v);
});
}
export const matConfig = matConfigWithUnit.reduce(
(prev, [key, value]) => ({
...prev,
......@@ -75,7 +81,3 @@ export const matConfig = matConfigWithUnit.reduce(
}),
{} as Record<keyof typeof _matConfigWithUnit, number>,
);
toCssProperties(matConfigWithUnit).forEach(([k, v]) => {
document.body.style.setProperty(k, v);
});
......@@ -40,6 +40,7 @@ import {
initSuper,
initWASM,
} from "./utils";
import { setCssProperties } from "../Duel/PlayMat/css";
const NeosConfig = useConfig();
......@@ -51,6 +52,10 @@ export const loader: LoaderFunction = async () => {
initForbidden();
initI18N();
initSuper();
// set some styles
setCssProperties();
return null;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment