Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Custom color of components depending on specific patternmatch id

Hey, i nowdays using patternmatch ids for my components. Before that i used specific color coding in my style.css when a name had a pattern in the id like:

div[id$='Apple'] .Select--multi .Select-value {
  background-color: #c662b9;
  color: #fff;

I wonder how i can achieve this now with patternmatch ids?

Any idea about colours of dropdown labels depending on pattern id @AnnMarieW @chriddyp
Best regards!

Hi @Varlor

I haven’t tried doing this yet, but I think you can find the answer here: [BUG] DashTable and Wildcard / Pattern Matching callbacks not working · Issue #765 · plotly/dash-table · GitHub

If you get this working, it would be great if you could post an example here, I’m sure others would find it very helpful :slight_smile:

1 Like

Thanks for the answer. But i found an easy way to do it. Instead of id$= i can use id*=. The id in the div elements are stringified. So as long as Apple appears somewhere in the patternmatch id it is styleable.

1 Like