How to remove the auto generated styles in components and widgets

Hi! Is there any way of getting rid of all the autogenerated class names in our custom components and widgets?

I’m talking about stuff like:


v-customcomponent
v-widget
v-has-width

and the dependant ones also:


v-customcomponent-mycomponent

I’m aware that maybe some of them they may be necessary for layouting purposes, but our design is mostly based in custom html and css, so we don’t really need them.

I have been searching around but I have found nothing. Apparently it is not possible in Vaadin 6, but I read it may be in Vaadin 7.

Any idea? Thanks!

I don’t know if it can be done or not; I just want to warn everyone that doing it

will

break all of your layouting and all built-in styles.

One thing that will
not
break your layouting
or
the builtin themes is setting a custom primary stylename to all of your components with
Component.setPrimaryStyleName()
. It works on a per-component basis, though.

Thanks guys, well I hope there is still a way to configure the render engine. We are moving to Vaadin from Gwt, with which we had created a custom widgets library, which is heavily based on Bootstrap. We were hoping to get simple and clean markup, like the one we had, but right now everything is cluttered with styles we don’t really use.

Please add the ability to remove auto-generated styles, especially v-widget on a CssLayout.