3

I am working on component, which has many links. I would like to style each link using some built-in classes (like "font-weight-regular ma-3 text-center") and some custom styles. I would like to have one common css class to apply to each link, so I don't need to apply 4 classes.

How can I do that?

I tried to use scss and @extend, but then I receive The target selector was not found. error.

Here is example style:

<style lang="scss" scoped="scoped">
  .text {
    @extend .font-weight-regular;
    @extend .ma-3;
    @extend .text-center;
    display: block;
  }
</style>

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.