Material-design-lite: Striped table

Created on 21 Jul 2015  路  1Comment  路  Source: google/material-design-lite

I wish there was a CSS class to display a table with striped rows, like Bootstrap is providing with thw .table-striped` class: http://getbootstrap.com/css/#tables

Most helpful comment

AFAIR, there is no striped table in the MD spec, so we won鈥檛 add support for it in MDL directly.

However, you can easily add a small style yourself 谩 la

.mdl-data-table tbody tr:nth-child(2n) {
  background-color: red;
}
.mdl-data-table tbody tr:nth-child(2n+1) {
  background-color: red;
}

>All comments

AFAIR, there is no striped table in the MD spec, so we won鈥檛 add support for it in MDL directly.

However, you can easily add a small style yourself 谩 la

.mdl-data-table tbody tr:nth-child(2n) {
  background-color: red;
}
.mdl-data-table tbody tr:nth-child(2n+1) {
  background-color: red;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dryror picture dryror  路  5Comments

arturgspb picture arturgspb  路  3Comments

an0nh4x0r picture an0nh4x0r  路  3Comments

tleunen picture tleunen  路  5Comments

DeepSwami picture DeepSwami  路  3Comments