Answers for "How to declare the default parameter for mixin scss"

0

How to declare the default parameter for mixin scss

@mixin square($size, $radius: 0) {
  width: $size;
  height: $size;

  @if $radius != 0 {
    border-radius: $radius;
  }
}

.avatar {
  @include square(100px, $radius: 4px);
}
Posted by: Guest on August-31-2021

Code answers related to "How to declare the default parameter for mixin scss"

Browse Popular Code Answers by Language