Non-css images (Vaadin 8)

My project has a large number of images developed by different groups.
At runtime we get the relative location of the image (they are stored as resources).
Mapping those to static CSS definitions is a maintenance headache.
I am aware there are resource-based images, but some tools seem to work only with CSS. For example: Grid.setStyleGenerator.

I wonder if I should create new CSS entries dynamically as new images are needed… (Not sure that will work in Vaadin 10)

I’ll appreciate any thoughts on this.


Dynamically generated CSS is a legit approach. If you do go that route, be careful - there’s no way of removing CSS definitions, so you might end up using a lot of memory in the client.

Thanks Olli, I’ll keep that in mind in my design.