about summary refs log tree commit diff stats
path: root/src/css
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-08-23 16:13:06 +0200
committerbptato <nincsnevem662@gmail.com>2024-08-23 16:13:06 +0200
commitb7c2c15a9c2503c01bb63e9e9c4c04378192a1dd (patch)
treefb9a671bb387bd15a6c8cb0efbea20b1a4a526f8 /src/css
parent9708f48d837c132332ff64257a6bc8e38d540147 (diff)
downloadchawan-b7c2c15a9c2503c01bb63e9e9c4c04378192a1dd.tar.gz
cssvalues: fix broken vmin, vmax
Diffstat (limited to 'src/css')
-rw-r--r--src/css/cssvalues.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css/cssvalues.nim b/src/css/cssvalues.nim
index 03118a42..8caa823a 100644
--- a/src/css/cssvalues.nim
+++ b/src/css/cssvalues.nim
@@ -585,9 +585,9 @@ func px*(l: CSSLength; window: WindowAttributes; p: LayoutUnit): LayoutUnit =
   of cuVw: toLayoutUnit(float64(window.width_px) * l.num / 100)
   of cuVh: toLayoutUnit(float64(window.height_px) * l.num / 100)
   of cuVmin:
-    toLayoutUnit(min(window.width_px, window.width_px) / 100 * l.num)
+    toLayoutUnit(min(window.width_px, window.height_px) / 100 * l.num)
   of cuVmax:
-    toLayoutUnit(max(window.width_px, window.width_px) / 100 * l.num)
+    toLayoutUnit(max(window.width_px, window.height_px) / 100 * l.num)
 
 func blockify*(display: CSSDisplay): CSSDisplay =
   case display