Page 1 of 1

p-Table odd/even row colors

Posted: 28 Jun 2018, 00:37
by Sasha
Hello,

We noticed that the alternating row colors behavior on Poseidon is different between p-dataTable and p-table.
In p-table, the first row(and all odd rows) is white, whereas the second row (and all even rows) is light gray.

This matches the p-table row colors in the default PrimeNG theme. Here, the "odd rows = white" works for the regular theme because the header is gray (https://www.primefaces.org/primeng/#/table/sort).

However, it looks weird in the Poseidon theme because the header has a white background in Poseidon:
https://www.primefaces.org/poseidon-ng/#/data

We think that the odd rows should be gray, and even rows white, in the default Poseidon stylesheet - and making that change will make the p-Table style look identical to the p-dataTable style.

Thank you!

Re: p-Table odd/even row colors

Posted: 29 Jun 2018, 10:12
by merve7
We fixed for next version. You can add below code in your stylesheet until release;

Code: Select all

body {
    .ui-table {
        .ui-table-tbody {
            > tr {
                background: #f0f3f5;
            }

            > tr:nth-child(even) {
                background-color: #ffffff;
            }
        }
    }
}

Re: p-Table odd/even row colors

Posted: 30 Jun 2018, 00:30
by Sasha
Thank you!! : )