Skip to content

Commit 491a339

Browse files
committed
If expressed in px, express directly as int
1 parent dfaee45 commit 491a339

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/css_to_ts/typography.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function parseTypographyVariants(rawCssCode: string): TypographyVariant[]
4444
const value = declaration.value as string;
4545

4646
int: {
47-
const n = parseInt(value);
47+
const n = parseInt(value.replace(/px$/, ""));
4848

4949
if (isNaN(n)) {
5050
break int;

0 commit comments

Comments
 (0)