LearnBoost/stylus — Issue #518: Expression in mixin not working
Author: chowey
Created: 2012-01-13 15:22:45+00:00
State: open

For some reason, an expression that normally works fine isn't working in a mixin. The exact thing that fails is this:

horizontal-center(w)
position absolute
left 50%
width w
margin-left -(w/2)

There is no error or anything, but the `margin-left` statement is dropped from the output css.

It is weird, because the following all DO work:

In a mixin with no negative:

horizontal-center(w)
margin-left (w/2)

Not in a mixin:

.center-me
w = 800px
margin-left -(w/2)

In a mixin with a variable:

horizontal-center(w)
a = -(w/2)
margin-left a