Dynamically set css' with Vaadin 7
Have you ever tried to add/remove/change style sheets of Vaadin components dynamically, without css file modification? We didn't find suitable methods in Vaadin' standard components.
We miss methods like
addStyle("padding-left: 5px;");
removeStyle("padding-left: 5px;");
in Vaadin. It's very easy to change style sheets with css files that are included in your project(s), but if you need a little bit more control... or must create dynamic applications - it's not possible out-of-the-box.
I'm not sure why there are no such methods, because GWT has all of them?
But no worries, with Vaadin 7 it's easy to add support for CSS manipulation. Simply use UI Extensions.
You'll find our CssExtension in our Vaadin UI project.