about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/css/cssvalues.nim2
-rw-r--r--test/layout/margin.expected5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/css/cssvalues.nim b/src/css/cssvalues.nim
index 2bd7615b..35487dfd 100644
--- a/src/css/cssvalues.nim
+++ b/src/css/cssvalues.nim
@@ -1320,7 +1320,7 @@ func lengthShorthand(cvals: openArray[CSSComponentValue];
     for i, t in props.mypairs:
       let j = if i == 0:
         0 # top
-      elif i == 3:
+      elif i == 2:
         2 # bottom
       else:
         1 # left, right
diff --git a/test/layout/margin.expected b/test/layout/margin.expected
index 73eaa60e..9872e68e 100644
--- a/test/layout/margin.expected
+++ b/test/layout/margin.expected
@@ -1,8 +1,7 @@
 spacer
 
-  left, right: 2em
-  top, bottom: 1em.
-
+    left, right: 2em
+    top, bottom: 1em.
 
 spacer
                                              width: 10em