Skip to content

Commit 2e16969

Browse files
committed
No need to replace css variables in typography
1 parent 491a339 commit 2e16969

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/bin/css_to_ts/typography.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,7 @@ export function parseTypographyVariants(rawCssCode: string): TypographyVariant[]
5353
return n;
5454
}
5555

56-
return value.replace(/var\((--[^)]+)\)/g, (...[, cssVariableName]) => {
57-
assert(is<`--${string}`>(cssVariableName));
58-
59-
const cssVariableValue = getCssVariable(cssVariableName);
60-
61-
assert(
62-
isInvariantAcrossTheme(cssVariableValue),
63-
"CSS variable for TypoGraphy that depends on the theme have been introduce, the alg need to be made a bit more sophisticated."
64-
);
65-
assert(
66-
isInvariantAcrossScreenSizes(cssVariableValue),
67-
"CSS variable for TypoGraphy that depends on screen width have been introduce, the alg need to be made a bit more sophisticated."
68-
);
69-
70-
return cssVariableValue.root.light;
71-
});
56+
return value;
7257
})())
7358
);
7459

0 commit comments

Comments
 (0)