web-components
web-components copied to clipboard
Add even/odd parts to grid details
Describe your motivation
The details cell does not have even-odd parts applied, so it's not possible to write the following style with part selector
:host [part~="odd-row"] [part~="details-cell"] {background: red}
:host [part~="even-row"] [part~="details-cell"] {background: blue}
Describe the solution you'd like
I would like an even/odd part to be applied to the details <td> (or maybe even-details/odd-details for compatibility), so that I can write vaadin-grid::part(odd-row details-cell) {background: red}
Describe alternatives you've considered
No response
Additional context
No response
This is actually achievable using style properties in V24. The cell background (including the details cell) can be styled with --vaadin-grid-cell-background so you can do
vaadin-grid::part(odd-row) {
--vaadin-grid-cell-background: red;
}```