Create Reusable CSS with Mixins Help

Create Reusable CSS with Mixins Help
0.0 0

#1

Tell us what’s happening:

I cant seem to figure out how to do this part: “Then use the border-radius mixin to give the #awesome element a border radius of 15px”

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: 15px;
    height: 15px;
    background-color: green;
    @include border-radius: ($radius: 15px);
  }
</style>

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

Your browser information:

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

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


#2

You got the concept, just few syntax issues:
First one:

- border-radius: $radius;

Second one:

@include border-radius : ($radius: 15px);

Good luck! :slight_smile: