From 3b5a680fdf4a9d64f3688214feb21d2a82b9bf92 Mon Sep 17 00:00:00 2001 From: Isabell Date: Mon, 29 May 2023 03:31:06 +1000 Subject: [PATCH] fix: MFM crop percentage parsing --- packages/client/src/components/mfm.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/src/components/mfm.ts b/packages/client/src/components/mfm.ts index 650a79832..23a933348 100644 --- a/packages/client/src/components/mfm.ts +++ b/packages/client/src/components/mfm.ts @@ -244,11 +244,11 @@ export default defineComponent({ break; } case "crop": { - const top = parseFloat(token.props.args.top ?? "0%"); - const right = parseFloat(token.props.args.right ?? "0%"); - const bottom = parseFloat(token.props.args.bottom ?? "0%"); - const left = parseFloat(token.props.args.left ?? "0%"); - style = `clip-path: inset(${top} ${right} ${bottom} ${left});`; + const top = parseFloat(token.props.args.top ?? "0"); + const right = parseFloat(token.props.args.right ?? "0"); + const bottom = parseFloat(token.props.args.bottom ?? "0"); + const left = parseFloat(token.props.args.left ?? "0"); + style = `clip-path: inset(${top}% ${right}% ${bottom}% ${left}%);`; break; } case "scale": {