Method argument error in 7th level


#1


Hello,

I am trying to solve 7th problem in mixins-and-parent-selector but I get an error.

Error: wrong number of arguments (1 for 0) for `photo-content'
        on line 103 of main.scss
>>         @include photo-content('titanosaur');
   -----------------^

// I wrote the code which is below.

@mixin photo-content($file) {
  content: url(#{$file}.jpg); 
  object-fit: cover;
}

.photo {
  width: 60%;
  margin: 0px auto;
  @include photo-content('titanosaur');
}

Why do I get that error? Could you help me?

Cheers.

PS: I solved the problem via https://discuss.codecademy.com/t/string-interpolation-excercise-returns-a-compile-error/45491/11 Thanks.


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.