about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/layout/engine.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index fd4f4a1d..aa0567bb 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -709,14 +709,13 @@ proc positionBlocks(box: BlockBox) =
   template apply_child(child: BlockBox) =
     child.offset.y = y
     child.offset.x = x
-    case
-    box.computed{"text-align"}
+    case box.computed{"text-align"}
     of TEXT_ALIGN_CHA_CENTER:
       child.offset.x -= child.width div 2
     of TEXT_ALIGN_CHA_LEFT: discard
     of TEXT_ALIGN_CHA_RIGHT:
       child.offset.x -= child.width
-    elif not child.computed{"width"}.auto and child.contentWidth < box.contentWidth:
+    elif spec and child.contentWidth < box.contentWidth:
       let margin_left = child.computed{"margin-left"}
       let margin_right = child.computed{"margin-right"}
       if margin_left.auto and margin_right.auto: