Can I @extend complicated class in SASS

46 Views Asked by At

I have this auto-generated scss file that is beyond my control and I can't change it.

[class^="auto-generated-class-"]:before,
[class*=" auto-generated-class-"]:before {
  ... styling properties...
}

I want to @extend this class into another class

.my-new-class {
  @extend [class^="auto-generated-class-"]:before
}

and get as a result

.my-new-class {
  ... styling properties ...
}

this @extend doesn't work and I get an error message. Sass is looking for a simple @extend like @extend .simple-class and there is no documentation for a complex extend like @extend [class^="auto-generated-class-"]:before. Is there a way to make a complex @extend like that?

0

There are 0 best solutions below