From a56b180273789ef12b03c7bfcaf04ef0179eb266 Mon Sep 17 00:00:00 2001 From: Willy Brauner Date: Mon, 8 Jan 2024 11:18:53 +0100 Subject: [PATCH] fix calc detection in convertRemToPx.ts (#166) Co-authored-by: Willy Brauner --- apps/front/src/libs/dom/convertRemToPx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/front/src/libs/dom/convertRemToPx.ts b/apps/front/src/libs/dom/convertRemToPx.ts index 95a50cd1..21a56bab 100644 --- a/apps/front/src/libs/dom/convertRemToPx.ts +++ b/apps/front/src/libs/dom/convertRemToPx.ts @@ -19,7 +19,7 @@ export const convertRemToPx = (pxValue: number): number => { * @returns */ const _convertFontSizeCssVarToPx = (cssUnitValue: string): number => { - const isCalc = cssUnitValue.startsWith("calc") + const isCalc = cssUnitValue.includes("calc") const isVw = cssUnitValue.endsWith("vw") const isVh = cssUnitValue.endsWith("vh")