Reputation: 15646
In my web project I use Vaadin 7.3.6.
My custom css file is here:
myproject\src\main\resources\VAADIN\themes\non.print.component.css
In non.print.component.css
@media print {
.noPrint {
display:none;
}
}
In my code I use this:
import com.vaadin.ui.Button;
Button myButton = new Button("My custom button");
myButton.setStyleName("noPrint");
But it's not work. When I print current page, the myButton also print.
Upvotes: 0
Views: 50
Reputation: 83
Your css file will not be used by the Vaadin UI until you do not declare it or include it in your custom theme. The best way is to create your custom theme, then you'll have to :
Please check basics of theming vaadin7 at : https://vaadin.com/docs/v7/framework/themes/themes-css.html
You do not want to create a theme, two solutions :
Regards Sebastien
Upvotes: 1