How to style Vaadin's Grid cells and not apply the style to the header-cells

Hello,

I’m using Vaadin 23.3.2 and the Grid component. I’m not using Spring-Boot.
I need to apply a CSS style to the cells, while not applying to the header-cells.
I have a number of columns that are dynamic (I can have as few as 5, but can be up to 15 as well).

I tried using CSS selectors (but I’m unfamiliar with ::part ::slotted and so on, so I may have missed a simple solution).

I also tried applying a style to the header and using :not, to no avail
I tried this way as well :

  grid_.addColumn(new GridDynamicValueProvider(index))
                        .setTooltipGenerator(row -> row.getValue(index).toString())
                        .setClassNameGenerator(line -> "grid-cell-collapse")
                        .setHeader(headerSpan).setFlexGrow(1).setSortable(true);

But it does not seem to be applied. I do not see the span using the inspector.
Does anyone has any advice ?

This is explained in the documentation here: Grid | Components | Vaadin 23 Docs

Note the comment in the CSS file, which shows you where you have to put your CSS file to make it work.

Just tried and it works.Thank you very much !
Not sure how I managed to read past it…