Hello,
we have found out how to change the appearance of a ComboBox via CSS in VAADIN. It is described in this post:
https://vaadin.com/forum#!/thread/115299
But the code suggested by Jouni Koivuviita changes the appearances (e.g. background color) of all combo boxes. We would like to set the background color of the required fields only.
How can this be achieved with VAADIN?
Thank you for your answers.
jason132
(jason attin)
May 24, 2016, 7:56pm
2
Can’t you add an extra class
.addStyleName()
and then use it to target the element you want?
mcollovati
(Marco Collovati)
May 24, 2016, 8:26pm
3
When you set field as required on server side (Field.setRequired(true) ) the css class v-required is automatically applied to the component.
So a rule like the following may do the job
.v-filterselect.v-filterselect-required .v-filterselect-input {
background-color: red;
}