fix: MFM crop percentage parsing

This commit is contained in:
Isabell 2023-05-29 03:31:06 +10:00
parent 62fce3a32e
commit 3b5a680fdf

View file

@ -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": {