How do you write tr: nth-child (odd) in Sass?

Is this sass code valid?

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

Be that as it may, it does not color my tables in alternating rows.

+3
source share
2 answers

Which browser are you using? nth-child not currently supported in Firefox, or IE . You will probably have to use the old thing of odd / even classes.

+4
source

The compass provides mixins to style your tables with sass, which requires a few extra CSS classes due to poor CSS3 support.

. wiki docs. A .

+1

Source: https://habr.com/ru/post/1710840/


All Articles