How do you write tr:nth-child(odd) in Sass?
-
06-07-2019 - |
Question
Is this sass code valid?
tr:nth-child(odd)
:background-color #cccccc
Somehow, it does not color my table's alternating rows.
Solution
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.
OTHER TIPS
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow