LearnBoost/stylus — Issue #569: How to scope mixins a la less
Author: bikkies
Created: 2012-02-14 15:43:43+00:00
State: open

Hey,
trying to convert twitter bootstrap to stylus and having an issue with the gradients defined in their mixins.

#gradient
horizontal($startColor = #555, $endColor = #333)
background-color: $endColor
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
background-image: -ms-linear-gradient(left, $startColor, $endColor); // IE10
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
background-image: linear-gradient(left, $startColor, $endColor); // Le standard
background-repeat: repeat-x

but not sure how to represent this in stylus without totally flattening it...

here is a simple example i've been trying to make work

#font
serif()
font-family: Georgia, "Times New Roman", Times, serif
h1
background-color red
#font
serif()
border:1px solid green

Any suggestions much appreciated.
Thanks