-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Vaadin 7 UI Design By Example: Beginner's Guide
Follow these steps to change the way labels look:
Open the themes example application on your IDE.
Edit the cool mixin (in cool.scss) to include one rule for labels:
@mixin cool {
@include chameleon;
.v-label {
color: #fff;
background-color: #4455aa;
font: 16px Verdana, Arial;
padding: 5px;
margin-bottom: 10px;
}
}Run the application.
Well, this happened:

We defined a rule to be applied to labels. The CSS class v-label is automatically added to every label element.
How to know which CSS classes are added by Vaadin? The fastest way to get this information is by inspecting the HTML in your browser. You can also find this information in the Book of Vaadin, the official Vaadin reference. For example, if you are interested in the CSS classes used for Label, you can take a look at (https://vaadin.com/book/vaadin7/-/page/components.label.html).
Change the font size
Change margin width
Change background colour