sass-mixin

how to make mixin with argument with different url of background-image property??
it does not compiling with me to css :

@mixin sm-icon($url) {

background-image:url($url);
background-repeat: no-repeat;
background-size: contain;

}

A mixin is only a declaration and generates no CSS if it isn’t used somehow. So if the code you showed in your post is the only code, it would generate no CSS. You would have to have something like the following to generate code:

@mixin sm-icon($url) {
  background-image: url($url);
  background-repeat: no-repeat;
  background-size: contain;
}

.cat-icon {
  @include sm-icon(https://placekitten.com/g/200/300);
}

See the Sass documentation on mixins for more details.

I hope that helps!