CustomField in Table alignment

I have a CustomField that is just a wrapper for a TextField so I can add a ClickListener. The Composition Root of the CustomField is a HorizontalLayout containing the TextField.

It works fine but the text is always at the bottom when the text for regular fields is centered. Any way to get the text of the CustomField centered in the table as well.

I have a Table.CellStyleGenerator that sets special CSS but nothing I’ve tried works:

.v-table-cell-content-specialfields {
	text-align: left;
	vertical-align: text-top;
	padding-top: 0px;

Any help would be appreciated.

I was using a TextField constructor that set the caption to “”. This allocated space for the empty caption which caused it to look bad in a Table. Creating the TextField with a different constructor that didn’t set the caption solved the issue and causes a CustomField with a TextField in a Layout, to look just like a regular TextField.