         
         insertSubview(spacerView, atIndex: 0)
         return spacerView
+    }
+    
+    private func createCanvasFitConstraints() -> [NSLayoutConstraint] {
+        func widthFitConstraint() -> NSLayoutConstraint {
+            return constraint(item: self, attribute: .Width, toItem: nil, attribute: .NotAnAttribute, priority: 49, identifier: "TZSV-canvas-fit")
+        }
+        
+        func heightFitConstraint() -> NSLayoutConstraint {
+            return constraint(item: self, attribute: .Height, toItem: nil, attribute: .NotAnAttribute, priority: 49, identifier: "TZSV-canvas-fit")
+        }
+        
+        var result = [NSLayoutConstraint]()
+        
+        let baselineAlignment = (alignment == .FirstBaseline || alignment == .LastBaseline) && axis == .Horizontal
+
+        if baselineAlignment {
+            result.append(heightFitConstraint())
+        }
+        
+        switch distribution {
+        case .FillEqually, .Fill, .FillProportionally:
+            break
+        case .EqualSpacing, .EqualCentering:
+            switch axis {
+            case .Horizontal:
+                result.append(widthFitConstraint())
+            case .Vertical:
+                result.append(heightFitConstraint())
+            }
+        }
+        return result
     }
     
     private func createSurroundingSpacerViewConstraints(spacerView: UIView, views: [UIView]) -> [NSLayoutConstraint] {

                    if index > 0 {
                        distributionSpacers.append(addSpacerView("TZSV-distributing"))
                    }
                }
                
                switch axis {
                case .Horizontal:
                    stackViewConstraints.append(constraint(item: self, attribute: .Width, toItem: nil, attribute: .NotAnAttribute, priority: 49, identifier: "TZSV-canvas-fit"))
                    if alignment == .FirstBaseline || alignment == .LastBaseline {
                        stackViewConstraints.append(constraint(item: self, attribute: .Height, toItem: nil, attribute: .NotAnAttribute, priority: 49, identifier: "TZSV-canvas-fit"))
                    }
                case .Vertical:
                    stackViewConstraints.append(constraint(item: self, attribute: .Height, toItem: nil, attribute: .NotAnAttribute, priority: 49, identifier: "TZSV-canvas-fit"))
                }

                var previousArrangedSubview: UIView?

                    views.append(arrangedSubview)
                    index++
                }

                stackViewConstraints += createFillConstraints(views, constant: 0, identifier: "TZSV-distributing-edge")
                stackViewConstraints += createFillEquallyConstraints(distributionSpacers, identifier: "TZSV-fill-equally")
