---
# System prepended metadata

title: deference between variable and mixin?

---

# deference between variable and mixin?

variable main hum ek value ko define kar skte hai.

$primary : #ccc;

body { color:$primary;} // use

mixin
mixin main hum ek se jayeda properties ko define kar sakte hai.

@mixin reset-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

@mixin horizontal-list {
  @include reset-list;

  li {
    display: inline-block;
    margin: {
      left: -2px;
      right: 2em;
    }
  }
}

nav ul {
  @include horizontal-list;
}


