Thanks Nathan, that's at least a bit better. And yeah, if I can ween myself off hex values and move to lighten() we'll be all set.
On Apr 19, 6:16 pm, Nathan Weizenbaum <[email protected]> wrote: > No, there's no way to dynamically access variables like that. Here's > what I'd suggest: > > =pct(!n, !color) > .pct#{!n} > background-color = !color > > +pct(0, #fff) > +pct(f0faff) > > If you're using the Sass 3 beta, though, it might be worthwhile to > just use the lighten() function: > > $pctblue: #0DB0FF > > @for $n from 0 to 9 > .pct#{$n} > background-color: lighten($pctblue, $n * 50%/9) > > > > > > On Mon, Apr 19, 2010 at 12:11 PM, jdwy <[email protected]> wrote: > > Here's what I was hoping to do. 10 color variables, then loop and look > > them up with little reflection. Is there any way to get this to work? > > Or a better tack to take? Thanks. > > > !pctblue0 = #FFF > > !pctblue1 = #F0FAFF > > ... > > > @for !n from 0 to 9 > > .pct#{!n} > > background-color = !pctblue#{!n} > > > -- > > 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 > > athttp://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 > athttp://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.
