Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add even/odd parts to grid details #7224

Open
javier-godoy opened this issue Mar 15, 2024 · 1 comment
Open

Add even/odd parts to grid details #7224

javier-godoy opened this issue Mar 15, 2024 · 1 comment
Labels
enhancement New feature or request vaadin-grid

Comments

@javier-godoy
Copy link
Contributor

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}

image

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

@web-padawan web-padawan added enhancement New feature or request vaadin-grid labels Mar 15, 2024
@rolfsmeds
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vaadin-grid
Projects
None yet
Development

No branches or pull requests

3 participants