p-Table odd/even row colors

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
Sasha
Posts: 49
Joined: 08 Mar 2017, 23:46

28 Jun 2018, 00:37

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!

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

29 Jun 2018, 10:12

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;
            }
        }
    }
}

Sasha
Posts: 49
Joined: 08 Mar 2017, 23:46

30 Jun 2018, 00:30

Thank you!! : )

Post Reply

Return to “Poseidon - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests