1

I have this SASS code:

.card.job.card-border-color-6:hover .button {
  background: #ffdedb;
  transition: background 400ms ease-in-out;
}

.card.job.card-border-color-6 .button:hover {
  background: hsl(14,  100%, 53%);
  color: white;
  transition: background 400ms ease-in-out;
}

But I want to make it generic, with some kind of wildcard syntax, something like this:

.card.job.card-border-color-*:hover .button {
  background: #ffdedb;
  transition: background 400ms ease-in-out;
}

.card.job.card-border-color-* .button:hover {
  background: hsl(14,  100%, 53%);
  color: white;
  transition: background 400ms ease-in-out;
}

However this syntax is not correct, what is the correct way in Sass to write this code to make it generic?

Nubok
  • 3,502
  • 7
  • 27
  • 47
fgonzalez
  • 3,787
  • 7
  • 45
  • 79
  • 1
    Possible duplicate of [wildcard \* in CSS for classes](https://stackoverflow.com/questions/5110249/wildcard-in-css-for-classes) – jmargolisvt Jan 21 '18 at 17:40

0 Answers0