Cannot get injected CSS to work

In preparation for working on the scheduling portion of the app I’m building/converting, I’m doing some tests with injected CSS and I can’t get it to work.

I’m injecting the CSS from the BeforeShow event, and the inspector in my browser is showing that the CSS does get injected. I have both a label and a textfield I’m trying to test the recoloring of and it’s not working.

The browser’s inspector is showing that when either setStyleName() or addStyleName() is used, TWO styles are getting added to the list of styles: the style itself and also v--. So for example if I use setStyleName(".vtcolor-test") on a Label, the inspector shows that both .vtcolor-test and v-label-.vtcolor-test were added to the label - and also the label does not change style.

What am I doing wrong, or missing?

Nevermind; I’m a CSS newbie, and was setting() with the . as part of the name, and you can’t do that. :smiley: CSS is setup as .name { color: …; background-color: …; } … but when setting you have to leave the . off.

Newbie mistake!

Also keep in mind that the setter in the Calendar control prepends the v-calendar-event- part; pass the name without that or it gets preprended again and makes debugging “fun.” :smiley: