// 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
y = - (@height * n) - unit(v_offset, px)
background-position: (0 - unit(h_offset, px)) y
sprite(image, height, v_offset = 0, h_offset = 0)
- sprites(image, height, 1, v_offset, h_offset)
+ height: unit(height, px)
+ if image[1]
+ background: url(image[0])
+ background: url(image[1]), linear-gradient(transparent, transparent);
+ else
+ background-image: url(image)
+ background-repeat: no-repeat;
+ background-position: (0 - unit(h_offset, px)) (0 - unit(v_offset, px))
// Styling for a variable height element with an image background where the
// middle repeats vertically. You must split your image into three images, and
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
unless parent_width // should only happen at top level
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'
+ for k, v in css_rules
+ if 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