Grid vertical alignment

Hello. With the wrap cell content theme of the Grid component, is it possible to configure the vertical alignment of the cells that don’t fill up completely? By default they’re centered but I would like them to be at the top. (Vaadin 23)

Hey, there’s (at least) a couple of ways to do that with css:

vaadin-grid-cell-content {
    align-self: start;

or, if you want to limit it to Grids with the wrap theme

vaadin-grid[theme~="wrap-cell-content"] vaadin-grid-cell-content {...

Both of the above works in a regular global stylesheet, e.g. styles.css.

This should also work:

vaadin-grid::part(body-cell) {
    align-items: start;

Hi, thanks! Using vaadin-grid-cell-content didn’t work as it was the vaadin-grid-cell-content itself that was centered within the cell (it was smaller than the cell). But body-cell did it. :+1: