Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Altering the colour or style of a component (item in OptionGroup in this ca

Frans Grotepass
6 years ago May 19, 2015 9:39am
Joacim Päivärinne
6 years ago May 19, 2015 1:49pm

Hey Frans,

I don't think it's currently possible to add style names for individual option group items.
You could use checkboxes instead, or if the option group's content is fixed, you could target its children with > *:nth-child(<index>).

.v-select-optiongroup > span:nth-child(1) {
  color: blue;
}
Frans Grotepass
6 years ago May 19, 2015 1:56pm
Frans Grotepass
6 years ago May 19, 2015 2:58pm
Frans Grotepass
6 years ago May 26, 2015 9:48am
Frans Grotepass
6 years ago May 27, 2015 8:41am
Joacim Päivärinne
6 years ago May 28, 2015 11:41am
Frans Grotepass
6 years ago May 28, 2015 11:46am
Frans Grotepass
6 years ago May 28, 2015 11:57am