Formatting table footer elements

In a proiect I was required to put numbers in the footer in an accounting style. Although I searched for a while I could not find a proper method. Unfortunately, Vaadin does not support components in the table footer, nor adding styles to the footer cells.

I found a workaround though. Here it is for anyone interested.

1- Override the footer style in your custom css theme

  .v-table-footer-container {
    font-size: 12px;
    font-weight: 700;
    white-space: pre;
    text-shadow: none;
    line-height: 5px;
    border: 0px;

2- Then I wrapped the string to be displayed within HTML tags

String price = "<pre><font color='red'>" +
               String.format("$%10.2f", total.setScale(2, RoundingMode.HALF_UP)) +
table.setColumnFooter("price", price);

Hope this helps someone. Any comments are welcome.