A controversial topic of injecting CSS and styles directly from Java code has divided opinions for long and thus we have not implemented this possibility in Vaadin. At least not yet.
Should we?
Created
a ticket with a brief API proposal
. Feel free to comment about it here or directly at the ticket.