You should almost never need to use interpolation when assigning a variable or using it in a property. Just include the variable directly, like so:
$green: #b5d446 $greenLighter: lighten($green, 5%) $greenDarker: darken($green, 10%) If you use interpolation, Sass will convert the variable to a string. On Wed, Apr 14, 2010 at 12:34 AM, Jesse Dodds <[email protected]> wrote: > This is probably a rookie mistake, but my head is being done in. > > $green: #b5d446 > $greenLighter: lighten(#{$green}, 5%) > $greenDarker: darken(#{$green}, 10%) > > After looking through the documentation, I assumed this would work, > however it throws the error: Sass Error: "#b5d446" is not a color for > `lighten'. The thing is, it works if i directly insert the hex code in > place of the interpolated variable. *headdesk* > > Any help would be appreciated. > > Cheers, > Jesse > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=en.
