JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
stylus: finish/fix outer_width arg for columns
[wfpl.git] / stylus_helpers.styl
index e6df86e..d885abe 100644 (file)
@@ -82,7 +82,8 @@ linear_scale_calc(pb, ps, cb, cs)
 // To create a minimum distance between: don't use word-spacing, it's broken in
 // firefox. Instead, try padding on the children and negative margin on the
 // parent.
-space_evenly(line_height = 1.2em)
+space_evenly(line_height = 1.2)
+       line_height = unit(line_height, em)
        text-align: justify
        & > *
                display: inline-block
@@ -368,15 +369,14 @@ wfpl_columns_helper(top, node, selector, parent_width, expected_width)
                                left_width += v
                        if match('^((margin|padding)-right)|(border-right-width)$', k)
                                right_width += v
-                       if k != 'type' && k != 'child' && k != 'name' && k != 'outer-width' && k != 'outer_width'
+                       if k != 'type' && k != 'child' && k != 'name' && k != 'outer_width'
                                css_rules[k] = v
                for k, v in node
                        if k == 'width'
                                width = v
-                               outer_width = left_width + v + right_width
-                       if k == 'outer-width' && k == 'outer_width'
-                               outer_width = k
-                               width = v - left_width - right_width
+                       if k == 'outer_width'
+                               outer_width = v
+                               css_rules['width'] = v - left_width - right_width
                if (!width) && (!outer_width)
                        if parent_width
                                outer_width = parent_width
@@ -390,7 +390,7 @@ wfpl_columns_helper(top, node, selector, parent_width, expected_width)
                        parent_width = outer_width
                top['css'][selector] = css_rules
                for k, v in node
-                       if k != 'outer-width' && k != 'outer_width' && k != 'border-width' && k != 'border-left-width' && k != 'border-right-width'
+                       if k != 'outer_width' && k != 'border-width' && k != 'border-left-width' && k != 'border-right-width'
                                if typeof(v) == 'unit' && unit(v) == 'px'
                                        responsive_css_rules[k] = floor(unit((v / parent_width) * 100, '%'), 4)
                top['responsive_css'][selector] = responsive_css_rules