Jesse..
You can just use css/sass.
.abc
  :background #abC
.white
  :background #fff

  - row_class = cycle("abc", "white")
 -for article in @articles
    %div{:class=>row_class}

Something like that...
But seriously that may not be the cause of the error.

On Thu, Oct 29, 2009 at 2:03 AM, Jesse <[email protected]> wrote:

>
> Failing example (matching first arguments in #cycle) ---
>
>  %tbody
>    %tr
>      %td
>        - 1.upto(3) do |i|
>          %div(style="background-color: #{cycle '#abC', '#fff'};"
> class="td")= i
>
>      %td
>        - 1.upto(3).each do |i|
>          %div(style="background-color: #{cycle '#abC', '#fff'};"
> class="td")= i
>
> Working example (differing first arguments in #cycle) ---
>
>  %tbody
>    %tr
>      %td
>        - 1.upto(3) do |i|
>          %div(style="background-color: #{cycle '#abC', '#fff'};"
> class="td")= i
>
>      %td
>        - 1.upto(3).each do |i|
>          %div(style="background-color: #{cycle '#abc', '#fff'};"
> class="td")= i
>
> It also fails using css classes .odd & .even for the rows, and with
> local string variables odd & even
>
> (I realize that this may not be a haml bug, but I've gotten this far.)
>
> Expected result
>
> ==
> ++
> ==
>
> Actual result
>
> =+
> +=
> =+
> >
>


-- 
-----
BridgeUtopia Web
http://blog.bridgeutopiaweb.com

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to