how to dinamically create a css file as a part of my custom theme

hello vaadiners,

I would like to dinamically create/update a css file which is part of my custom theme (so itt is placed in /VAADIN/themes/my-theme/statuses.css for example)

what is the best way to create/update this file in vaadin?

And where should I place this code? inside my application class or in a separate static class?

For dynamically changing the style the chameleon theme editor uses a set of css as the base and then use the
CSSInject add-on
to push new CSS styles corresponding to the user choices.

I guess you would have to do the same to be entirely dynamic.