Create Reusable CSS with Mixins Failing Tests When It Should Not

Create Reusable CSS with Mixins Failing Tests When It Should Not
0

#1

Tell us what’s happening:

Unless I am overly tired, my code does everything it should, yet I keep getting this failed test:

Your code should declare a mixin named border-radius which has a parameter named $radius.

This is happening with most of the Sass challenges, actually. And I tried Firefox, Chrome, and Safari and get the same failed tests.

Your code so far


<style type='text/sass'>
  
  @mixin border-radius ($radius) {
    -webkit-border-radius: $radius;
    -moz-border-radius: $radius;
    -ms-border-radius: $radius;
    border-radius: $radius;
  }
  
  #awesome {
    width: 150px;
    height: 150px;
    background-color: green;
    @include border-radius(15px);
    
  }
</style>

<div id="awesome"></div>
  

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/sass/create-reusable-css-with-mixins


#2

You encountered a very silly bug. It won’t pass unless you remove the space before ($radius).


#3

Oh my gosh, thank you. This was driving me up a wall.

Actually just realized I don’t have to even do the challenges to get the certificate, only the projects? I feel so silly now doing all of these challenges that I know just going through the motions to get certificates.


#4

The certificates only require that you do the projects


#5

Thank you for clarifying! It makes perfect sense now that I think about it.