From 1db67e60a93035de418f95ef3bbc84a176f824f5 Mon Sep 17 00:00:00 2001 From: Bendy Zhang Date: Wed, 25 Sep 2019 16:46:22 +0800 Subject: [PATCH] Fix clock number position issue if overwrote theme spacing does not return a number as 1rem (#1327) --- lib/src/views/Clock/ClockNumber.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/views/Clock/ClockNumber.tsx b/lib/src/views/Clock/ClockNumber.tsx index 6063185d6..686887b9f 100644 --- a/lib/src/views/Clock/ClockNumber.tsx +++ b/lib/src/views/Clock/ClockNumber.tsx @@ -47,7 +47,7 @@ export const useStyles = makeStyles( height: 32, userSelect: 'none', position: 'absolute', - left: `calc(50% - ${size / 2}px)`, + left: `calc((100% - ${typeof size === 'number' ? `${size}px` : size}) / 2)`, display: 'inline-flex', justifyContent: 'center', alignItems: 'center',