views:

286

answers:

2

Is this sass code valid?

tr:nth-child(odd)
  :background-color #cccccc

Somehow, it does not color my table's alternating rows.

+1  A: 

What browser are you using? nth-child isn't presently supported in Firefox, or IE. You'll probably have to use the old odd/even classes thing.

Pesto
I am using firefox 3
Vagmi Mudumbai
Then you're out of luck. Sass isn't the problem, the browser is.
Pesto
A: 

Compass provides mixins for styling your tables with sass, it requires some extra css classes due to poor support of CSS3.

See the Table Utilities section of wiki docs for more information. A demo is here.

chriseppstein